Its pretty much all in the title.
If I have a breadcrumb using something like %node:title, and the title in question contains characters like ' or &, then the breadcrumb outputs those characters as ' or &
Static breadcrumb components do not have this problem
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 1355066-16.patch | 625 bytes | benclark |
Comments
Comment #1
devuo commentedWill look into that, I'll probably fix that tomorrow and release a new version with the fix.
Comment #2
devuo commentedThis has been fixed in 7.x-1.4
Comment #3
bmx269 commentedThis is still an issue fo the breadcrumb, not the node title text. The fix needs be made for the %taxonomy_term:parent, %taxonomy_term:name token values.
Comment #4
devuo commentedI'm sorry bmx269, I've tried to replicate what you reported both with %node:term and %taxonomy_term:name with a term like this:
Lorem & %%%% () Ipsum'sAnd it get's printed correctly:
Home » %node:term » %taxonomy_term:name » %node:titleHome » Lorem & %%%% () Ipsum's » Lorem & %%%% () Ipsum's » Lorem & Ipsum ''' Great!Are you certain you're on the latest version? I'm marking this as fixed because I wasn't able to replicate what you reported and there were no other reports on such an occurrence after 7.x-1.4.
Comment #5
bmx269 commentedThis issue is only on the Node view panel. Here are the tokens I used:
Titles:
example.com
%taxonomy_term:parent
%taxonomy_term:name
%node:title
Paths:
%taxonomy_term:parent
%taxonomy_term:name
I am using 1.4.
Thanks
Comment #6
frixos12 commentedI also have the same problem in node view template panel.
I am using 1.5
Thanks
Comment #7
frixos12 commentedI have the same problem using node view template panel.
Using 1.5
thanks
Comment #8
devuo commentedHello frixos12, can you please be more specific? Can you give me the exact string that's causing the problem? Where is it defined? Is it a term, a node title, what?
Comment #9
frixos12 commentedHi and thank for your post.
I have created a variant for a certain content type which has a term reference field.
So in my breadcrumbs list i have as breadcrumb titles
%taxonomy_term_2:root
%taxonomy_term_2:parent
%taxonomy_term_2:name
%node:title
and as breadcrumb paths
product-categories/%taxonomy_term_2:root
product-categories/%taxonomy_term_2:parent
product-categories/%taxonomy_term_2:name
content/%node:nid
The root term name is Date & Care and it displays like Date & Care
Comment #10
devuo commentedI'll try to reproduce with what you reported and I'll tell you later my findings (probably not tomorrow, but late friday).
Comment #11
frixos12 commentedOk thanks for the effort!
Comment #12
frixos12 commentedis there a progrees to this manner??
Comment #13
devuo commentedThis problem has been finally fixed in 7.x-1.6.
Comment #14
devuo commentedComment #15
frixos12 commentedHi devuo and thanks for the commit.
There is still a problem. %taxonomy_term_2:root as breadcrumb title seems to work fine for characters like '&', but as Breadcrumb path the url have those characters as ' or &
Comment #16
benclark commentedJust a small tweak, but I ran into this issue where I had a keyword replacement that contains a single quote (') and it was still replacing it with '.
Your call to
html_entity_decode()on line 159 doesn't decode ' because the $flags parameter sets ENT_COMPAT by default, per the PHP doc page. If you set $flags to ENT_QUOTES, it'll catch the single quotes.I'm attaching a patch that adds ENT_QUOTES to the
html_entity_decode()call. Hope this helps!Comment #17
Vote_Sizing_Steve commentedI'm trying to use:
Content_Wizard?type[]=... as my Breadcrumb paths, but the resulting link is:
Content_Wizard%3Ftype%5B%5D%3D... any suggestions (I got as far as seeing the localized_options inluded 'html' => true before giving up and writing this post) are welcome.
Comment #18
johnnybgoode commentedI can confirm that the patch in #16 works using the %term:name substitution from a taxonomy_term_page panel. (panels_breadcrumbs version 7.x-1.6)
Comment #19
twodI can confirm the #16 patch is working, but why is the title being passed through
t()two lines later?It's only for static strings and could otherwise leave 'orphaned' strings to the translation database whenever the dynamic string changes. I removed that call.
The
check_plain()on the next loop is enough.Comment #20
devuo commentedThis issue is solved in 2.x to which a beta release was created today.
Comment #20.0
devuo commentedAdded code tags to (AFAICT) match the problem hinted at in the title.