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

wim leers’s picture

(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.

wim leers’s picture

Any news about this? :)

Gurpartap Singh’s picture

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

Gurpartap Singh’s picture

Status: Active » Fixed

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

Gurpartap Singh’s picture

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).

wim leers’s picture

Status: Active » Closed (fixed)

Cleaning up the issue queue.

EllECTRONC’s picture

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">

Gurpartap Singh’s picture

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?

EllECTRONC’s picture

Yes, I'm sure.

It may depend on the filters order?