Jump to content

text editor !


hassank1

Recommended Posts

thx for both of u ..

 

well the problem that if I used an advanced text editor .. ( that doesn't use bbcode ) .. it would be difficult to transfer the contents of the textbox into bbcode ... right ?

 

btw I've a function bbcode2html($text) ... so would it be easy to convert if I used it ?

Link to comment
Share on other sites

And advanced editor like fckeditor will return HTML contents, so there is no need to use bbcode.  ( IE. HTML is greater then BBCode)

 

If you want to use BBCode use a simple textare like in these forums.

 

yes I totally agree .. but what if user inject scripts tags into the text editor ex : " <script> //an unallowed script code </script> ... etc...

Link to comment
Share on other sites

When you go to process that text with PHP, you strip out or disable all HTML tags. Then tag the approved BBCode tags and convert them to HTML.

 

Also I want to double check that you understand that JavaScript or any script that can be put between <script></script> tags can not be run on your server and only can cause trouble on the clients web browser when it is redisplayed by the PHP script.

 

 

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.