httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil A. Hillard" <neil.hill...@agustawestland.com>
Subject Re: [users@httpd] rewrite issues with reverse proxy
Date Mon, 16 Oct 2006 12:58:10 GMT
Jeff,

Jeff DeFord wrote:
> All:
> 
> I have Apache 2.0.59 running as a reverse proxy with mod_proxy_html. I
> was able to get the proxy server to work and also the URLs all appear
> to originate from the proxy server.
> 
> There is, however, a small issue where the index page is not getting
> rewritten correctly and &nbsp is getting rewritten as &amp:nbsp, so
> when viewing the page from a browser, you actually see the characters
> "&nbsp" on the page where the "&nbsp" was rewritten as "&amp:nbsp" .
> 
> I realize that the source html is pure rubbish as the instances where
> the rewrite gets improperly translated the source reveals the "&nbsp"
> was not delimited with the proper ";". That being said...
> 
> Other than rewriting all the crap HTML - How do I get around this???

That kind of makes it a rhetorical question!  If it's your code then fix
it.  You can use the following regex to resolve the problem:

s/&nbsp(?!;)/&nbsp;/g

But it won't work in sed because of the look ahead.

If it's third party code then get them to fix and ask them what
standards they adhere to and how they validate it.

They've probably never heard of http://validator.w3.org/.  Or the
HTMLTidy plugin for Firefox!

I have to keep banging the standards drum to my suppliers because of the
same problems - although it tends not to be this trivial and is
sometimes due to incorrect nesting, etc. - there's just no excuse for
bad code!

HTH,


				Neil.

-- 
Neil Hillard                    neil.hillard@agustawestland.com
AgustaWestland                  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message