Re: [users@httpd] rewrite issues with reverse proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(?!;)/ /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@xxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux