Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have a website with a single quote in its breadcrumb title:
Something's fishy with China algae plant
This was being displayed as:
Something's fishy with China algae plant
In custom_breadcrumb.module's custom_breadcrumb_nodeapi(), I added the html decode in the following line:
$trail[] = l(html_entity_decode($title, ENT_QUOTES, 'UTF-8'), trim($paths[$i]));
This fixed the problem nicely.
Comment | File | Size | Author |
---|---|---|---|
#4 | custom-breadcrumbs.patch | 693 bytes | herve |
Comments
Comment #1
MGN CreditAttribution: MGN commentedThanks for the idea. An alternative solution would be to use decode_entities($title) (see http://api.drupal.org/api/function/decode_entities ). Older sites still running php4 will have problems with html_entity_decode producing a warning something like "cannot yet handle MBCS in html_entity_decode" but decode_entities from the drupal 6 api seems to work fine.
Comment #2
MGN CreditAttribution: MGN commentedThis has been implemented in custom breadcrumbs 6.x-2.x-dev.
Comment #4
herve CreditAttribution: herve commentedA patch for the same bug in D7 version of the custom breadcrumbs module.
Comment #5
herve CreditAttribution: herve commentedUpdate the status to patch the D7 version.
Comment #6
jvandooren CreditAttribution: jvandooren commentedPatch works great for D7.
Comment #7
dkre CreditAttribution: dkre commentedThanks for the patch Herve.
Comment #8
colanIs this still needed in the 7.x-2.x branch?