Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

No HTML, but HTML

Quote Reply
No HTML, but HTML
Hi all, i want to get rid off the possibility to enter HTML inside the add/modify-form.
Think i could do this with an regex, but on the same i need a way to enter
.
Or could it be done with "RETURN" like here in the forum?

Robert

Quote Reply
Re: No HTML, but HTML In reply to
You would need to convert the < to "& lt ;" and the > to "& gt ;".

That should solve the problem since the browser will interpret that as a > or < but will not consider it a tag marker.

To actually parse out the HTML tags requires a parser, or a complicated regex. I really don't believe a simple "Look for a < and convert everything up through the next > to a whitespace" would work, since what would happen if there was a single opening < but no closing > ?

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: No HTML, but HTML In reply to
Think, i mean something else, but the whole theme is not an easy thing.

If you enter the &xxx; for >< for example, it will be there still you see it the next time in the admin, then it will be the normal <> ...

I would only get rid of the HTML, so nobody could enter <form> .e.g.; if i do that with your links, you will get problems in admin :-)
on the other hand i need the -br- Tag to make new lines :-(; so i cant rexep the < or >;
but maybe i donīt need the -br- - i have never tried to enter "Return" inside an add/modify-form; maybe this helps; if not i must think about how to give users a way to make a new line or an paragraph (RETURN or SHIFT+RETURN)

Im still working on my homepage-generator and this is a beasty thing; im always afraid what happens if i will have 200 fields and 10.000 links :-( - May the force (or better a pentium 5000 MHZ and 10 GIG RAM) be with me ...

Robert