Jump to content

Outputting html source back to .php page from field in MySQL database


adrian28uk

Recommended Posts

I have found a script that allows me to enter rich text via wysiwyg  editor on my site. It works great and inserts the html code to the field [ descripton ] in my database.

 

I am now scratching my head on how I convert this back to my webpage for a preview.

When I output this back to my page it showing me the html code only. the

 

< becomes <

 

" becomes "

 

And so on.

 

I need it to output and convert the html code so it shows the preview

 

Hope you can make some sense of thos.

Link to comment
Share on other sites

Be VERY careful with HTML input from untrusted sources. People can throw any data they want into a POST request, including dangerous javascript... if this is outputted to the end user at any point, an XXS attack can be easily performed.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.