Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
6.x-2.12
Component:
exposed filters
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Aug 2009 at 15:28 UTC
Updated:
17 Dec 2011 at 11:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
garryh commentedThis issue seems to depend on the style of the view display. The link below came out of a table style view. Look at the mess in the alt and title tags.
<a href="/node/89" title="Monday&amp;#039;s lineup" alt="Monday&amp;#039;s lineup">Monday's lineup</a>Unencoded ampersands in taxonomy term names wreak havoc too.
Comment #2
joecanti commentedI get this same problem when adding descriptions to images uploaded via the CCK imagefield, so I guess this might be the cause. For now I'm using the accent instead of the apostrophe eg `instead of ' - Did you get anywhere in solving this problem?
thanks joe
Comment #3
alex72rm commentedsubscribe
Comment #4
ethnovode commentedSubscribe
Comment #5
epersonae2 commentedI'm having this issue with a taxonomy item with an apostrophe - "President's Club" - which is used as an argument in a link.
<a href="/?q=awardslist/President%26#039;s Club">President's Club</a>I'm going to either try joeclanti's cludge (`) or see if I can make the argument work with the taxonomy ID instead.
Comment #6
epersonae2 commentedchanging title - removing "CCK", since it looks like it's any field with an apostrophe.
Comment #7
eiland commentedThis one is prettier to use as replacement:
’
Comment #8
cmav77 commentedWhile this doesn't attack the problem at the root, I've found this is a good interim solution if you're printing your own tags. Use the htmlspecialchars_decode function to convert the html entities to their characters.
(the html_entity_decode function might come in handy as well)
Note that the ENT_QUOTES flag makes the function process single quotes (apostrophes).
For example, I've done this to print out my tags for a given node:
Hope that helps!
Comment #9
beckyjohnson commentedcmav77, how would you re-write this to deal with apostrophes and the description field that attaches to images?
I assume I have to replace this code with my own, pertaining to the description field:
$term = isset($r['view']) ? $r['view'] : taxonomy_get_term($r['value'])->name;
But, how do I know what variable to use instead of $term?
Comment #10
locomo commentedsubscribe
Comment #11
pomliane commentedComment #12
PMatwyuk commentedsubscribing
Comment #13
kla2t commentedsubscribing
Comment #14
kla2t commented@cmav77: Your contribution was very helpful to me. I ran into the apostrophe problem with a custom link, too, and I solved it for the time being with a hack of views_handler_field.inc.
In line 566 (v 1.33.2.13) I added the ENT_QUOTES flag:
- and now the single quote gets processed.
Actually, I cannot tell if the ENT_QUOTES solution will cause new issues (e.g. in combination with Pathauto), but I think it might be worth proposing it as a patch.
Comment #15
esmerel commentedadding tag
Comment #16
kla2t commented#14 as a patch for views/handlers/views_handler_field.inc:
Comment #17
pomliane commentedNo "official answer" on this issue (and its child issues as in #2)?
Considering almost everybody uses Views and the characters concerned are common in different languages shouldn't there be a lot more susbcribers to this issue? Or, in other words — and really sorry to ask this... — aren't we missing something?
On the other hand if this really is an issue and it affects as many facets of Views, shouldn't its priority be set to "major"?
Comment #18
dawehnerThere are so many issues in the issue queue, i doubt that using another priority really helps.
The patch looks fine but it would be cool if some users could test the patch.
Comment #19
pomliane commentedPatch at #16 tested on one installation and, unfortunately, no effect with Views 6.x-2.11 — or even Views 6.x-2.9 here...
Comment #20
ethnovode commentedSame here, no effect with views 2.11.
Comment #21
dawehnerSo
Comment #22
Jessica A commentedComment #23
dawehnerMoving back to the old status. You should at least give a reason.
I reallity this doesn't matter because i guess not many people in contrib will look at them.
Comment #24
Jessica A commentedI had this issue and was going to post as major but now I've solved the problem on my end.
Not sure if this is the same for others, but it was just an end user error on my part. Had the cck field configured to plain text instead of filtered.
Comment #25
clashar commentedsubscribe
I have CCK with Content Taxonomy, so I think I can't choose any plain or HTML format.
Comment #26
j0nathan commentedNot sure if this is related, but I'm coming from #542974: Cleaning FileField Path and Filename: single quotes are replaced by 039
Subscribing.
Comment #27
geerlingguy commentedComing from #613324: Apostrophe in term name causes argument title to display html character code - the RSS feed title is borked on my site, when I use a taxonomy term as an argument. Here's the
<link>markup that views outputs:<link rel="alternate" type="application/rss+xml" title="Archbishop&#039;s column" href="/taxonomy/term/31/all/feed" />Additionally, the feed itself (http://stlouisreview.com/taxonomy/term/31/all/feed) shows:
<title>Archbishop&#039;s column</title>The title should be "Archbishop's column"
(page with example: http://stlouisreview.com/category/section/archbishops-column)
Comment #28
loicgao commentedSubscribe
Comment #29
jlord87 commentedsorry for my noobness but may this problem be related to this issue?
http://www.fuyu.it/immagini/coloured/hansel-e-gretel
(look at the image description -> "L& #039; effetto" instead of "L'effetto;")
I've used the field description of the images in cck.
Content Construction Kit (CCK) 6.x-2.9
Views 6.x-2.x-dev (2011-Gen-05)
thanks
Comment #30
BlueBlossom commentedHas anyone come up with a solution for this?
I am having the problem in my exposed filters - everywhere else it is fine. I tried BEF with the same results. I cam using CCK with Content Taxonomy.
I have tried every patch I could find without any luck.
Comment #31
feuillet commentedExactly the same Problem here
+subscribe
Comment #32
aaronelborg commentedsubscribing. same problem. node title in a view with style of 'RSS Feed - Fields'
Comment #33
shaneonabike commented+1 same issue reported here #1136146: Exposed filter drop-down encoding text values
Comment #34
shaneonabike commentedActually what's interesting is if you use Taxonomy as a filter itself this isn't a problem, but if you use Content: Fieldname (Content Taxonomy Fields) it is encoded?
Comment #35
davidneedhamThis also happens for node titles in my view. The proposed fix in #14 and the patch in #16 don't work for me.
Comment #36
davidneedhamThis is hardly a 'minor' issue.
Comment #37
mennonot commented+1 I'm having this problem when using views to display the Description field for images uploaded via the CCK imagefield. I am not using exposed filters at all.
I tried this patch from Merlionofchaos for a similar issue and it did not work
Modules
Views 6.x-2.12
Content 6.x-2.9
FileField 6.x-3.9
ImageField 6.x-3.9
Comment #38
carsonw+1
Comment #39
Crom commentedSame problem as #27 - subscribing
Comment #40
effulgentsia commentedCross-linking #1373584: Apostrophes (single quotes) in token values used for link path in "Output this field as a link" are double-escaped and #1373588: Use decode_entities() instead of html_entity_decode(). If the latter is committed and backported to 6.x, that should fix this issue, but not marking this a duplicate yet in case that patch doesn't fly.
Comment #41
dawehnerSo #1373588: Use decode_entities() instead of html_entity_decode() contains a proper fix for this issue.