Welcome to Geeklog, Anonymous Saturday, December 28 2024 @ 09:03 am EST

Geeklog Forums

Story Editor stripping out some HTML


Status: offline

ItsCurly

Forum User
Junior
Registered: 12/05/05
Posts: 24
Hi there,

I have just started adding a few stories to my site and GL seems to be stripping out some of the HTML, not the stuff I would expect.

If I use:
Text Formatted Code
<td width=25%>



 


Then it strips out the width=25% section leaving me with just:
Text Formatted Code
<td>



 


It also removes any  & n b s p ; tags and replaces them with spaces (I have to spread out the name of the tag as it replaced it with a space in this forum!

td tags are turned on, but it makes my tables look a bit messy as they aren't formatted right.

I can't see anything in the config.php regarding this, as it only specifies allowed tags eg td, tr etc.

Also, how do you implement the
Text Formatted Code
[ story: ]
 
tags? I assume these allow you link to another story which is what I am after.

Any help would be appreciated.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Read the FAQ Why does Geeklog remove certain HTML tags?

And also About Autolinks And Autotags

Both links were produced using autotags, btw (faq: and story:, respectively).

bye, Dirk
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
What Dirk fails to mention is that GL uses a html filter. This filter, kses, strips all your html to the bare bones. This is controlled by allowed_html in config.php. This is a good thing because it prevents evil persons from trying to hack your site. You can also turn off the use of kses in config.php.

Currently there is a bug in kses in that the filter will declare most anything inside a style statement that has a ":" (colon) as bad and strip it out.

Byte
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ByteEnable: What Dirk fails to mention is that GL uses a html filter.

It's all explained in the FAQ entry I pointed to ...

bye, Dirk
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Currently there is a bug in kses in that the filter will declare most anything inside a style statement that has a ":" (colon) as bad and strip it out.


That explains the frustration I am experiancing. The FCKeditor uses "font-weight: bold" to make a bold faces and Kses keeps stripping it off.

Sam
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
I've emailed the author of kses asking about this bug, but have not received a response. I've started to debug it a little bit already. I know which function its failing in now, but since this is regex stuff, I will have to study it harder than usual.

Byte
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Quote by samstone: That explains the frustration I am experiancing. The FCKeditor uses "font-weight: bold" to make a bold faces and Kses keeps stripping it off.

Sam

Are you sure - it should be used the <strong> tag. It does with the current version that is distributed with GL 1.4 anyways.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Yes I was talking about FCKeditor that comes with GL 1.4. It uses &lt;span style=&quot;FONT-WEIGHT: bold&quot;&gt; on my site.

I can't figure out how to force it to use 'Strong' or simply 'b'.

Sam
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Uh, FCKEditor generates different HTML for some features like bold and italic. If using IE, you get the strong tag but in FF, you get the span style ... html generated.

There are several bug reports on this issue and it looks like they have tried a few times to fix this. The latest 2.1 version that we have included implemented the span tag method for Mozilla browsers. Apparently Mozilla has some issue with the strong tag and I have no idea why they don't just use the bold tag.

I will try to find out more.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Quote by samstone: Yes I was talking about FCKeditor that comes with GL 1.4. It uses on my site.

I can't figure out how to force it to use 'Strong' or simply 'b'.

Sam


There are config settings in the fckeditor/fckconfig.js file that will force FireFox to use either the < b > or the < strong > tags. I was testing these earlier and not seeing any effect - turns out you have to make sure you clear the FF cache to pick up the changes. Closing down FF and restarting is not sufficient.

The setting that control how the bold and italic emphasis are treated are:
FCKConfig.ForceStrongEm = false ;
FCKConfig.GeckoUseSPAN = false ;



Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Wonderful!

Thanks, Blaine.

Sam
 Quote

All times are EST. The time is now 09:03 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