Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.11
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Apr 2010 at 21:35 UTC
Updated:
30 Dec 2010 at 18:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
anrikun commentedComment #2
dawehnerPlease provide a patch
Comment #3
merlinofchaos commentedAlso reproduction instructions would be valuable so we can confirm both 1) the bug and 2) the fix.
Comment #4
anrikun commentedSorry, this is more complicated than I thought and this is not a bug.
This issue happens when using [tokens] inside the "alt" field.
If the value of the token is already safe (escaped) then it will be escaped once more inside the "alt" value.
So I would need to use the raw value of the token but it isn't provided.
For instance, in addition to the [title] token, the [title-raw] token should be provided too.
Turning this into a feature request.
Comment #5
anrikun commentedHere is a simple patch that applies to 6.x-2.11 to add this feature:
it allows to use the raw values of fields as tokens.
For instance, when you want to display an Alt text avoiding text to be escaped twice, you can now add the -raw suffix to the token name:
Instead of:
Comment #6
merlinofchaos commentedActually, now that I understand this a little better, I think the first one is more accurate. The only problem was that without an explanation of what was happening, it took some investigation to decipher what you meant.
I was worried about double quotes causing problems, but l() seems to already be safe with these fields so we can safely do the decode where you put it.
Committed to all branches. Actual patch committed attached.
Comment #8
iamjon commentedmarked #946324: & and " in Alt Field of Replacement patterns as duplicate