in reply to Strip HTML tags again
Hi monks, i am little bit disappointed in all this discussion.
If the input from chat is displayed in HTML page, then any "<" or ">" in the displayed text will be transformed to the < and > . So if you can see <this is a normal text> in your web browser, than in the sources of a HTML page it will be <this is a normal text> in this case you should not be bothered about knowing all tags, and if you want to see the text as it is in browser you need just to replace "<" by "<" and ">" by ">" in your perl code.
Re: Re: Strip HTML tags again
by dda (Friar) on Jul 01, 2002 at 12:49 UTC
|
Ok, I'll try to explain. If someone types '<b>some text</b>', it should not be be displayed as a bold text in chat window, and displaying the HTML source is not a good idea too. I just have to strip all tags from the line.
And '<some text>' should not be stripped. All regexp-based solutions will strip this too. I'm still looking for regexp-based stuff that will use %HTML::Tagset::isKnown hash to filter out only correct HTML tags.
--dda | [reply] |
|
| [reply] |
|
The problem is how to extract 'my match' from the regexp shown earlier (or other - please suggest one).. I know about that hashset, and what I need is to apply it to my sub.
--dda
| [reply] |
|
|
|
|
|