/    Sign up×
Community /Pin to ProfileBookmark

Convert slash-quotes in file contents

I have a file containing XHTML and PHP coding.
I open the file using a user-interface (HTML-form with textarea) that shows the file’s content in XHTML/PHP coding. With all the HTML tags and PHP scripts intact.

But after editing the file and saving it. All the quotes (single and double) show up as ” or ‘ (escape-chars).

Example:
Opening file for the first time the content shows:
[FONT=”Fixedsys”]<?php echo ‘Show me the money!’; ?>[/FONT]

Opening file for second time the content changed to:
[FONT=”Fixedsys”]<?php echo ‘Show me the money!’; ?>[/FONT]

It’s not suppose to covert quotes to escape-chars.

I’ve tried using htmlspecialchars_decode with flags for quotes and even html_entity_decode with flags. But whatever options I try, every quote is converted to a quote after saving the file.

How can I solve this?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@CharlesDec 28.2010 — Your best bet is to use a real text editor. Barring that, see http://us2.php.net/manual/en/function.stripslashes.php .
×

Success!

Help @ddriessen80 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...