How do I rewrite the src attribute of a script tag?

25 views
Skip to first unread message

Geoff Waggott

unread,
Mar 8, 2011, 12:09:08 PM3/8/11
to SiteMesh 3 Users
Hi all,

I trying to use SiteMesh to rewrite urls in markup based on tag and
attribute names by registering some TagRule implementations. However
if I set up a rule to work on script tags to rewrite the src attribute
it never gets called.

Googling around for related issues I found this post:
http://groups.google.com/group/sitemesh-team/browse_thread/thread/35bab035eb862c19?pli=1

Which suggests that script tags are ignored because they do not
contain structured content; which is fair enough, but the attributes
of the tag itself are still part of the page's structured content and
it is desirable (for me at least) to be able to manipulate them. I've
checked the alpha 2 source and it lexer.flex file still seems to be
treating script tags in the same fashion as comments etc.

Are there any plans to change this behaviour? Or is there another way
to rewrite that attribute value using SiteMesh?

Thanks,
Geoff
Reply all
Reply to author
Forward
0 new messages