Preserve non-breaking spaces after calling purify method

40 views
Skip to first unread message

Esteban Trujillo Franco

unread,
Aug 20, 2018, 12:33:52 PM8/20/18
to htmlpurifier
Hi all, 

Currently I'm sanitizing an input which contains some non-breaking spaces ( ) that must remain after calling purify method.

Example input:
<table>
    <tr>
        <td>1&nbsp;2</td>
    </tr>
</table>

Expected output:
<table>
    <tr>
        <td>1&nbsp;2</td>
    </tr>
</table>

Is there a way to accomplish that goal? I already tried with %Core.EscapeNonASCIICharacters but it doesn't solve the issue, since the blank spaces are part of the ASCII charset.

Keith Davis

unread,
Aug 21, 2018, 2:36:26 PM8/21/18
to htmlpurifier
Looks like there are some forum posts related to that issue, but the forum is down right now.

Keith Davis

unread,
Aug 26, 2018, 8:00:47 AM8/26/18
to htmlpurifier

Esteban Trujillo Franco

unread,
Aug 28, 2018, 12:06:45 PM8/28/18
to htmlpurifier
Thanks Keith! I was looking for exactly that forum entry but it was down. Now is clear why it is happening and why is not possible to avoid that behavior.
Reply all
Reply to author
Forward
0 new messages