Support for $texy->allowedTags in texy module

petr.marhoun - February 21, 2008 - 17:15
Project:Texy!
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:havran
Status:closed
Description

It would be nice if there would be support for variable $allowedTags. I think that with current version of the texy module it is not possible to forbid for example font or bold tag. It could be changed by the attached patch.

AttachmentSize
texy-allowed-tags.diff1.53 KB

#1

havran - February 26, 2008 - 11:27

Thank you for patch. I have use it on my experimental Drupal installation. I think for usability we maybe can use some defaults (like Filtered HTML or same as Filtered HTML)? For now this patch change default experience with Texy! filter and maybe broke existing content for some users.

#2

havran - February 26, 2008 - 11:28
Assigned to:Anonymous» havran
Status:needs review» needs work

Changing info...

#3

havran - April 16, 2009 - 07:43
Version:6.x-1.0-beta1» 6.x-1.x-dev
Status:needs work» fixed

Thanx to patch.

#4

druppi - April 21, 2009 - 05:33
Version:6.x-1.x-dev» 6.x-1.0
Status:fixed» active

Thanks for Texy! It's a wonderful module.

But why did you reinvent the wheel in the current release? Html-filtering is not the purpose of this module, indeed it is html-generating. For html-filtering there a basic filters available like the html-filter. This filter, properly configured, should be the last filter in each input format. And it can be configured differently for each input format. The texy-filter can only be globally configured on the texy! settings page, but not on admin/settings/filters/n/configure!

To avoid conflicts, you have to set the html-filter in texy to <all>. So indeed, this setting is not not recommended but recommended!

#5

havran - April 20, 2009 - 16:51

Good point. In next version i set default value to <all>. Please can you wrote some text for little help with this (i'm not very good english speaker)? Something like: "Default is . If you want filter html tags use hhtml-filther together with Texy filter..."

<?php
'#description' => t('Allow following tags to appear in the text. Default value is empty - allow no tags. Specify <i>&lt;all&gt;</i> to allow all tags (not recommended). Use commas as separators.'),
?>

Thank you.

#6

druppi - April 21, 2009 - 10:42

No, I don't think, this is a good idea. I think, it is better to remove this feature again and to add a hint on the texy filter page:

Remember to not use texy!-filter alone in an input format, but add a html-filter as last filter in that input format to avoid malicious html code. An example for most commonly used html-tags in conjunction with texy! could be <p> <br> <a> <acronym> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <sub> <sup> <table> <td> <tr> <th> <h2> <h3> <hr>

You may change this tag-list if you wish. I copied it from my website where I use texy!

#7

ali_b - May 18, 2009 - 08:40

I tried to add
and
. It is not working for me... Please fix it, I love texy.

#8

havran - May 18, 2009 - 13:25

What version Texy filter you use? Latest version 6.x-1.3?

#9

ali_b - September 27, 2009 - 08:33

Hi, I have Allowed tags"
,
, but it is not working.
I still get
in formated text.
Using latest 6x.1.3

#10

ali_b - September 27, 2009 - 08:35

in attach...

AttachmentSize
Untitled-2.gif 6.16 KB

#11

havran - September 28, 2009 - 06:33
Status:active» fixed

All tags must be without < and > characters.

#12

System Message - October 12, 2009 - 06:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.