Recently, all of my updated 4.7.1 sites have started having weird characters in their breadcrumbs. Here's an example:

"Home » News » Local news"

At first, I thought it was something strange I might have done on the theming level, but upon closer inspection I actually found the strange character inside the theme_breadcrumb($breadcrumb) function itself. Its even listed in the API's documention of the function. http://api.drupal.org/api/4.7/function/theme_breadcrumb

Now, what's REALLY weird is that I checked the CVS logs to see when this weird character was inserted, and found that its been there since the beginning of time. Yet, several sites on my local machine have the same versions of theme INC, but without the character.

I haven't checked, but the character may have gotten corrupted through out the entire CVS. Indeed, the civicspace trac doesn't show it. [ http://trac.civicspacelabs.org/cgi-bin/trac.cgi/file/branches/0.8.2.x/in... ]

Here's a patch for 4.7.1. My apologies if I got something wrong, but I marked this as critical as it very much appears to be everywhere, and is blatently apparent to website visitors, as well as admins.

CommentFileSizeAuthor
#1 themeinc_0.patch380 bytesNick Lewis
themeinc.patch372 bytesNick Lewis

Comments

Nick Lewis’s picture

StatusFileSize
new380 bytes

The original patch got corrupted with that character! Here's a new one with the HTML entity instead....

killes@www.drop.org’s picture

Priority: Critical » Normal

I am pretty sure you uploaded your files through ftp as ascii and they got broken in the transfer.

Nick Lewis’s picture

That is may be true for the patch. Should figure out how to avoid that. Re: the actual bug, its in the CVS tree on my browser, and all code for my sites is fetched, and updated via CVS.

killes@www.drop.org’s picture

the character looks ok in my checkout.

Nick Lewis’s picture

Status: Needs review » Closed (fixed)

Huh... it still shows up with the strange character in the CVS [ http://cvs.drupal.org/viewcvs/drupal/drupal/includes/theme.inc?rev=1.297... ], but I just did a checkout, and indeed found it missing -- weirdness. Closed weirdness, I suppose.

Scott’s picture

Status: Closed (fixed) » Needs review

I just downloaded 4.7.2 from the main download link (http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.2.tar.gz) using Firefox 1.5, and decompressed with 7-zip on Windows XP. The 8-bit characters are definitely there. A transfer or decompression error could not cause multi-character html entities to become their single-character equivalents. No other html entities were corrupted. I'm pretty sure the error is in the source file.

Scott’s picture

The corrupted text in the patch appears (on my system) to be slightly different than the corrupted text in the source file. I recommend patching the source file by hand, actually typing in ' & raquo; ' (without a space between the & and the r)

webchick’s picture

Scott, what did you view the source file in? Something like Notepad might not have the ability to display UTF-8 characters properly, vs. a more "robust" source editor. Also check killes's suggestion in #2.

Steven’s picture

Status: Needs review » Closed (works as designed)

api.module was buggy. It invoked htmlentities() on the code, which mangled any non-ASCII characters. I updated it in contrib. Core itself is perfectly valid UTF-8, and any invalid characters you see are the result of using the wrong character encoding.