Long story short, somehow urls with & instead of & made it out the 
door. I'm attempting to make these work in a sane manner via a rewrite 
rule. In the end I will use the "<rewrite>" tag to transform the URLs in 
place, but for testing, I'm using a "<redirect>" tag so I can see the 
result. For now I'm just trying to fix a single &amp;. Once I switched 
to <rewrite> I was just going to repeat the rule the maximum number of 
time I expected &amp; to appear to catch all the &amp;s in the query.

The rule I'm working with looks like:

<redirect full-url-regexp="^(.*)&amp;amp;(.*)$" target="$1&amp;$2"/>

Assuming the escaping works right (I love recursive escaping), this 
should have the effect or replacing the last literal &amp; in the full 
request string with a &. It doesn't seem to do that.

I've also tried:

<redirect full-url-regexp="^(.*)amp;(.*)$" target="$1$2"/>

I've tried many many variations on the theme including several things I 
consider "clever" and nothing seems to do what I want. Everything 
behaves in unexpected ways.  Some times firefox complains that the page 
isn't redirecting correctly (maybe firefox is interpreting &amp; and & 
as the same even though the server doesn't).  Sometimes the rewrite 
works the first time but not the second.

So, does someone have a canned solution for this problem? There doesn't 
happen to be a "<make-resin-convert-&amp;-to-&>" option (I know, amp; is 
a perfectly valid parameter name/start of name, but in this case, to 
quote my co-worker, "screw people who name their variables "amp;"").


resin-interest mailing list

Reply via email to