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? Quote 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? Quote 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 ? Quote 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> Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.