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

CommentFileSizeAuthor
#16 1355066-16.patch625 bytesbenclark

Comments

devuo’s picture

Assigned: Unassigned » devuo

Will look into that, I'll probably fix that tomorrow and release a new version with the fix.

devuo’s picture

Status: Active » Closed (fixed)

This has been fixed in 7.x-1.4

bmx269’s picture

Status: Closed (fixed) » Needs work

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

devuo’s picture

Version: 7.x-1.3 » 7.x-1.4
Status: Needs work » Closed (fixed)

I'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's

And it get's printed correctly:

Home » %node:term » %taxonomy_term:name » %node:title
Home » 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.

bmx269’s picture

This 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

frixos12’s picture

I also have the same problem in node view template panel.

I am using 1.5

Thanks

frixos12’s picture

I have the same problem using node view template panel.

Using 1.5

thanks

devuo’s picture

Hello 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?

frixos12’s picture

Hi 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

devuo’s picture

I'll try to reproduce with what you reported and I'll tell you later my findings (probably not tomorrow, but late friday).

frixos12’s picture

Ok thanks for the effort!

frixos12’s picture

Status: Closed (fixed) » Needs review

is there a progrees to this manner??

devuo’s picture

Status: Needs review » Closed (fixed)

This problem has been finally fixed in 7.x-1.6.

devuo’s picture

Version: 7.x-1.4 » 7.x-1.6
frixos12’s picture

Status: Closed (fixed) » Needs review

Hi 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 &

benclark’s picture

StatusFileSize
new625 bytes

Just 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!

Vote_Sizing_Steve’s picture

I'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.

johnnybgoode’s picture

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

twod’s picture

Status: Needs review » Reviewed & tested by the community

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

devuo’s picture

Status: Reviewed & tested by the community » Closed (fixed)

This issue is solved in 2.x to which a beta release was created today.

devuo’s picture

Issue summary: View changes

Added code tags to (AFAICT) match the problem hinted at in the title.