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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | themeinc_0.patch | 380 bytes | Nick Lewis |
| themeinc.patch | 372 bytes | Nick Lewis |
Comments
Comment #1
Nick Lewis commentedThe original patch got corrupted with that character! Here's a new one with the HTML entity instead....
Comment #2
killes@www.drop.org commentedI am pretty sure you uploaded your files through ftp as ascii and they got broken in the transfer.
Comment #3
Nick Lewis commentedThat 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.
Comment #4
killes@www.drop.org commentedthe character looks ok in my checkout.
Comment #5
Nick Lewis commentedHuh... 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.
Comment #6
Scott commentedI 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.
Comment #7
Scott commentedThe 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)
Comment #8
webchickScott, 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.
Comment #9
Steven commentedapi.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.