Download & Extend

Don't insert smileys in code tags

Project:Smileys
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

This is the desired and expected behaviour, but currently not being applied by smileys.module.

i.e.:

[code] :) [/code]

and

[notag] :) [/notag]
and

<code> :)

Comments

#1

(I accidentally hit the submit button too early...)

In all of these examples (note that the last example isn't rendered correctly either by drupal.org's filter... ironic), smileys.module's filter incorrectly inserts smileys.

We'd either have to use lookahead/lookbehind regexps, or split the text to only apply the smileys filter on the parts that are not inside of any of the tags listed above.

#2

Any news about this? :)

#3

This would be some regular expressions magic. I'm too busy this summers, can you take on it? :D

#4

Status:active» fixed

Fixed in DRUPAL-6--1-0-ALPHA5. Only for <code> and <pre> tags.

#5

Status:fixed» active

I think we can make this an option. Since I feel loading performance being hit when loading like 100+ smileys (which is very possible in fun communities).

#6

Status:active» closed (fixed)

Cleaning up the issue queue.

#7

Version:5.x-1.x-dev» 6.x-1.0
Priority:normal» critical
Status:closed (fixed)» active

I put

<code>RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?ваш-сайт.com [NC]< /code>

I get

RewriteCond %{HTTP_REFERER} !^http(<img src="http://site.ru/sites/all/modules/smileys/packs/Roving/drunk.png" title="Drunk" alt="Drunk" class="smiley-content" />?://(www.)?sitename.ru.com [NC]

I think smileys.module should avoid <code> and <code lang="somelang">

#8

Priority:critical» normal

That's what it already does. It avoids anything within <code> and <pre> tags. Are you sure your content has both starting AND closing <code> tags?

#9

Yes, I'm sure.

It may depend on the filters order?