htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
Is it possible to strip <IMG> tags?


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


John Byrne
New User

Mar 24, 2004, 10:35 AM

Post #1 of 3 (3425 views)
Shortcut
Is it possible to strip <IMG> tags? Can't Post

I want to restrict my users from posting images with the articles that they create, there is an image upload function to handle this.

I understant the basics of the cleanHTML function, but cannot quite seem to get the correct syntax to removes images.



Thanks a lot, John.


Luis
Veteran

Mar 25, 2004, 12:44 AM

Post #2 of 3 (3416 views)
Shortcut
Re: [John Byrne] Is it possible to strip <IMG> tags? [In reply to] Can't Post

Hi John Byrne:

unclean = unclean.replace(/<img[^>]*>/gi, '');

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


John Byrne
New User

Mar 25, 2004, 2:30 AM

Post #3 of 3 (3412 views)
Shortcut
Re: [Luis] Is it possible to strip <IMG> tags? [In reply to] Can't Post

Thanks a lot for the reply BUT just after I posted, I managed to solve the problem \o/

I also managed to stop tables and other stuff being pasted in, I find clients have a habit of making good websites look bad by using features just for the sake of them.

I hear you are quite the HTML area genius Luis, look forward to future mods ;)

 
 
 


Search for (options)