Subject: HTML filtering and andvanced editor

Posted on: 03/01/14 12:16am
By: casper

Hi,

I try to allow the following to the allowed list in the HTML-filter, so it can be used in advanced editor, but can't get it right...

For tables, a right-padding:
<table width="200" cellspacing="0" cellpadding="0" border="0" align="left" style="padding-right: 10px;">

For textcolor:
<span style="color: rgb(255, 255, 255);">

No matter how I try, for tables it gets stripped to this:
<table width="200" cellspacing="0" cellpadding="0" border="0" align="left" style="10px;">

And the textcolor looks like this:
<span style="rgb(255, 255, 255);">

What is the correct way to allow this??

Re: HTML filtering and andvanced editor

Posted on: 03/01/14 03:46am
By: Dirk

I don't think you'll get this to work since words followed by a colon, like that "color:", will always be filtered out as an unknown / unsupported protocol (like javascript: - you don't really want to allow those).

What you could do is define those as classes in your stylesheet and then ask people to use something like

<span class="highlight">

etc. That's a cleaner way of doing this anyway, since it would allow you to adjust colors later, in case you want to change your site's theme.

bye, Dirk

Sv: HTML filtering and andvanced editor

Posted on: 03/01/14 07:45am
By: casper

Hi Dirk,

Yes, stylesheet is a way to do it.
Text color is not the most used on any site, but when white text on a black background is required and the editor can do this inline, its too bad the editor and filter aint compatible.

Thanks for your help Smile

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=95490