![]() ![]() |
Audio Asylum Thread Printer Get a view of an entire thread on one page |
For Sale Ads |
In Reply to: Re: it's not a problem, I just found the expended effort peculiar posted by Rod M on March 26, 2004 at 22:57:09:
the special characters < and > Then nobody should notice the difference.I assume you don't allow users to post HTML code in certain places. Titles, certainly. A substitution like this will negate any attempts at HTML and will keep things looking as the user entered them. If I'm not mistaken, they'll also display correctly within an field.
![]()
Follow Ups:
and I can't imagine why. It can only cause problems. If someone explicitly enters the special character codes "& l t ;" and "& g t ;" (minuse the spaces, of course), why substitue angle brackets? Unless that's an unintended consequence of using some library or other in your code.Substituting the special character codes, on the other hand, is a good way to keep HTML from being entered where you don't want it. And like I tried to say in the last post, it still displays correctly in input and textarea form elements.
![]()
Actually, the code used to alway substitute the & l t ; and so forth. The problem was when the subject line got truncated due to a limit. I probably could have done a complicated fix and checked for a hung open bracket, but what happens is that is looks like an href because it picks up the next Posted link or something and the whole message is a weird link. I think I posted an example to Mart. The easy way out was to just change the bracket to a ( in the subject.Yes, other html get's purged out too in various input field like script tages and whatnot.
![]()
This post is made possible by the generous support of people like you and our sponsors: