i store my article in a xml file, so if i write into it special characters "'
xml automatically escapes this characters and when i get(via PHP) the xml content i get something like \"
. so if i write into xml "hello dude"
my html will look like this \"hello dude\"
how can i get the xml content like it was initially inserted("hello dude"
)? thanks
views:
352answers:
2
+1
A:
You haven't specified how you are reading or outputting the data, but neither HTML nor XML use the \
character to escape anything.
You might have magic quotes turned on. I'd suggest turning it off, as it isn't very effective. You can hack around it with stripslashes.
David Dorward
2009-12-12 21:14:45
A:
html_entity_decode()
takes an html-encoded strings and removes escaping (e.g., <
into <
).
stripslashes()
unescapes slashes (e.g. \'
into '
).
Tordek
2009-12-12 21:15:28