Welcome to Geeklog, Anonymous Sunday, September 01 2024 @ 01:16 am EDT
Geeklog Forums
HTML filtering and andvanced editor
Status: offline
casper
Forum User
Full Member
Registered: 02/11/04
Posts: 142
Location:Skien, Norway
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??
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??
13
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
13
12
Quote
Status: offline
casper
Forum User
Full Member
Registered: 02/11/04
Posts: 142
Location:Skien, Norway
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
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 Smile](https://www.geeklog.net/forum/image_set/pixel.gif)
10
12
Quote
All times are EDT. The time is now 01:16 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content