You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Jhon <de...@yahoo.com> on 2003/11/05 21:19:38 UTC

How to handle self-ending Tags in HTMLRewriter?

Hi,
 
Right now I'm using Websurf Portlet which uses HTMLRewriter to rewrite the urls so that they will be displayed in given Portlet window.
 
Websurf Portlet works just fine. But I have some other issue.
If the url which I'm fetching has self-ending tags 
for eg. <img src="/images/url.gif" />
In this case, the rewritten url contains one more closing bracket ">" so in after rewriting url, the resulting image tag looks like <img src="/images/url.gif" />>
 
Since my image tags carry url links with them, this extra closing tag gets visible. After debuggin' thru code found that in case of such tags only handleStartTag() gets called. And another thing that I noted is once parser finds / during processing, parser immediately puts the closing bracket itself.
 
Can anybody pls guide me in how to set the HTMLRewriter so that it will handle such self-ending tags in correct way to avoid appending of extra closing brackets ?
 
thanks,
j


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard