Closed (fixed)
Project:
Simplenews
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2009 at 10:33 UTC
Updated:
14 Nov 2009 at 14:07 UTC
Jump to comment: Most recent file
Comments
Comment #1
heine commentedBlock titles have no format, so using check_markup makes no sense.
Find out where the second check_plain takes place, then fix that. AFAIK, module supplied block titles 'subject' should display as is (block.module:487+).
Comment #2
jix_ commentedOr it might not even need to be filtered at all, I'm not 100% sure. Aren't blocks filtered with check_plain somewhere else already?
Here's another patch in case :)
Comment #3
jix_ commentedOh, didn't see #1 before I posted. I'll go and check where the other filter is.
Comment #4
jix_ commentedComment #5
jix_ commentedOk, turns out the check_plain that I removed was the second one. The first one is happening in taxonomy_get_term, which is called right before the block subject is set, so the patch in #2 should do the trick.
Comment #6
jix_ commentedDammit, sorry. I got confused there. It's not in taxonomy_get_term. I'll keep looking for it.
Comment #7
jix_ commentedHmm, still not entirely sure. But it is filtered before the block subject is set, so the patch in #2 still applies.
Comment #8
sutharsan commentedplease described what goes wrong _exactly_. Write down the steps to reproduce, I can't.
I have created a newsletter with an ampersant in the title. Enable the corresponding subscription block. The block title is displayed correctly. On the blocks admin page and on the block edit page the amp is double escaped. When I manually override the block title but still containing an ampersant, it behaves identical.
patch #2 is dangerous because it does not escape the newsletter title when displayed as block title. You can try it out by adding a HTML tag like
<strong>to the newsletter title and reading the page HTML output. You will find the tag unchanged.Comment #9
jix_ commentedOk, so somehow, a certain person who configured the newsletters for the site where this was happening managed to actually type
&in the newsletter's title field. That's why it went wrong.My sincerest apologies for all this confusion, and for wasting your time.