logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to correct &nbsp without trailing ";"
Author
andre.fischer



Joined: 31 Jan 2014
Posts: 8
Location: Canada, Toronto

PostPosted: Fri 27 May '16 21:00    Post subject: How to correct &nbsp without trailing ";" Reply with quote

I'm running Apache 2.4.18 on a RHEL 6.6 platform. I'm running Apache as a Reverse Proxy to a Callidus Application Server.

For some reason, Callidus is not always adding a trailing ";" to an &nbsp statement. Apache handles the " " statements correctly; but one without the trailing ";" get translated into "&ampnbsp", which causes the browser to added "nbsp" to text fields.

I've tried substituting this using:

AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|&nbsp[^;]| |i"


But it doesn't work.

Any thoughts?


Andre Fischer.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 27 May '16 23:03    Post subject: Reply with quote

This works for me

Code:
AddOutputFilterByType SUBSTITUTE text/html
# Append a semi-colon to every &nbsp
Substitute "s|&nbsp| |i"
# Remove any doubles (;;) caused by the above substitution
Substitute "s| ;| |qi"
# Note: do not use the 'q' if you have more substitutions to do.


The html file has:
Code:
<p>Test me out</p>
Missing ; &nbsp  Not &nbsp; Missing ; &nbsp<br />
Not       &nbsp; <br />
Missing ; &nbsp <br />
Missing ; &nbsp <br />
Not       &nbsp; <br />
Missing ; &nbsp <br />


Apache outputs
Code:
<p>Test me out</p>
Missing ; &nbsp;  Not &nbsp; Missing ; &nbsp;<br />
Not       &nbsp; <br />
Missing ; &nbsp; <br />
Missing ; &nbsp; <br />
Not       &nbsp; <br />
Missing ; &nbsp; <br />
Back to top
andre.fischer



Joined: 31 Jan 2014
Posts: 8
Location: Canada, Toronto

PostPosted: Sun 29 May '16 13:50    Post subject: Reply with quote

Thank you! This helped provide a working solution!
Back to top


Reply to topic   Topic: How to correct &nbsp without trailing ";" View previous topic :: View next topic
Post new topic   Forum Index -> Apache