jarv Posted February 21, 2012 Share Posted February 21, 2012 hi, I have some HTML to edit in my database, in my back end administration I have it in a textarea but when I go to edit it, it all messes up and lots of '/' area added, see below: Site Design by: <a href=\\\\\\\"http://www.jbiddulph.com\\\\\\\" target=\\\\\\\"_blank\\\\\\\" title=\\\\\\\"John Biddulph - Web Development\\\\\\\">jbiddulph.com</a> php code <p> <label>Site Design by</label> <textarea class="text-input small-input" name="SiteDesignby"><?php echo $row1['SiteDesignby'] ?></textarea> </p> someone suggested adding this to my page: SiteDesignby.value = SiteDesignby.value.replace(/\\*."/g,'"'); I added the code and nothing changed! Can anyone help please? Link to comment https://forums.phpfreaks.com/topic/257445-cms-editing-html-in-a-textarea-breaks-code/ Share on other sites More sharing options...
trq Posted February 21, 2012 Share Posted February 21, 2012 You need to find out how the slashes are getting there in the first place. What does the data look like in your actual database? Link to comment https://forums.phpfreaks.com/topic/257445-cms-editing-html-in-a-textarea-breaks-code/#findComment-1319506 Share on other sites More sharing options...
floridaflatlander Posted February 21, 2012 Share Posted February 21, 2012 Are magic_quotes set to on ? Link to comment https://forums.phpfreaks.com/topic/257445-cms-editing-html-in-a-textarea-breaks-code/#findComment-1319516 Share on other sites More sharing options...
jarv Posted February 26, 2012 Author Share Posted February 26, 2012 hmm Magic_Quotes? the data in the database is: <div class="social"> <span class='st_sharethis_hcount' displayText='ShareThis'></span> <span class='st_facebook_hcount' displayText='Facebook'></span> <span class='st_twitter_hcount' displayText='Tweet'></span> <span class='st_linkedin_hcount' displayText='LinkedIn'></span> <span class='st_fblike_hcount' displayText='Facebook Like'></span> <span class='st_email_hcount' displayText='Email'></span> </div> Link to comment https://forums.phpfreaks.com/topic/257445-cms-editing-html-in-a-textarea-breaks-code/#findComment-1321406 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.