When rendering titles in the breadcrumb it does not handle special characters...

See screenshot.

CommentFileSizeAuthor
Showing special characters as html7.98 KBphilosurfer

Comments

philosurfer’s picture

Acctually finding out its the drupal_get_title() function... it runs check_plain() which is:

function check_plain($text) {
  return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}

I will try and work on a patch.

sonemonu’s picture

Status: Active » Closed (won't fix)

This is not a bug of the EasyBreadcrumb module.

philosurfer’s picture

Status: Closed (won't fix) » Needs work

How do you figure?

sonemonu’s picture

Status: Needs work » Postponed (maintainer needs more info)

Hi philosurfer,

I just deduced it from your previous comment, you said it's related to the "drupal_get_title()" function (from the Drupal core code). Thus it's not a bug of this module. Are u talking about implementing a feature in this module for handling special characters?

@philosurfer:
Acctually finding out its the drupal_get_title() function... it runs
check_plain() which is:

function check_plain($text) {
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}
I will try and work on a patch.

philosurfer’s picture

yeah the problem exists when you use a ' in the title.. because drupal_get_title() returns results HTML friendly, it causes your module to render that HTML code in plain text...

I tried several other characters and it seemed to be fine....

sonemonu’s picture

I've tested this using the following hard-code script and it is correctly rendering the text "It's working..." in the breadcrumb. So this is no related to the "drupal_get_title()" function.

$page_title = "It's working...";
$page_title = check_plain($page_title);
...

Thus it seems the origen of this issue is coming from the characters in the URL. Some questions:

  1. Are you ticking the checkbox "Use the real page's title when available" in the EasyBreadcrumb's settings page?
  2. Could you please attach a screenshot of your web page including the URL?
  3. Could you please attach attach a screenshot of your settings for EasyBreadcrumb?
  4. At last but not at least, do you have knowledge about the module "Transliteration" and its option Transliterate prior to creating alias? See "Recommended modules" in the EasyBreadcrumb project page. My point is you should not have such special characters in your URLs.

Important Note: please go to the Pathauto's settings page ("admin/config/search/path/settings"), under PUNCTUATION, and be sure the option Single quotation marks (apostrophe) (') is set to "Remove".

sonemonu’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)