[Solved] “Drupal titles are not HTML rendered ”
You've probably noticed the ugly title but unfortunately Drupal doesn't render the title, that is, it doesn't interpret the code and display the correct character(s).
In the above example, the codes either side of the title are actually left and right double quotes, the curly type. Using the same code in the body of text “here for instance” and as you can see, they are (codes) correctly rendered or interpreted.
Why mention this I here you ask. Well, it seems like Wordpress does render titles and as such those codes are transferred to Drupal in the conversion process. After conversion, you may see some ugly titles as you see for this forum post. It's not a fault of the conversion process, it's just the way Drupal handles titles.
I'm now researching ways of addressing this problem and most likely it will entail the search and replace feature. Currently the search and replace feature only addresses the body and teaser and not titles. This will be addressed in the next version.
My Google Search led me to this site and this site in relation to HTML character codes.
Steve
My running website
- 255 reads


As you can see from the subject line, I've worked it out. I've successfully created a function that parses a string of text, strips out the html symbol codes and replaces them with the actual symbols.
This will be incorporated in the next version (1.04).
Steve
My running website
I've got apostrophes and ampersands becoming their html symbol codes here: http://friendlycoffeehouse.org/aggregator
Any chance you could help me (and others) to resolve that?
(Depending on the latest news, you may have to scroll through a couple of pages to see this effect.)
WOULD LOVE to fix this, and I'm guessing your function holds the key!
1. Create a text file, which contains all (or most) of the html codes and their corresponding html numerical codes. A sample is displayed opposite. (This file resides in the same directory as the converter program - therefore a full copy can be seen there)
2. Load the contents of the text file into an array or dictionary.
3. It's a two part pass method that I implement.
4. First pass, must check for all the html alphabetic codes
(<, >, ")etc. and convert them to their numerical counterparts(< ;, > ;, " ;)etc. (note, there is a space preceding the semi-colon, only there so as to correctly show the numerical code. If removing the space, the symbol is displayed)5. Second pass, now run a RegEx conversion function over the text replacing all numerical codes with their unicode equivalents. This is the RegEx search pattern
"\&#(\d+);".Please note, when I do write up a more thorough explanation it will be in non PHP terms as I'm not yet skilled in PHP.
Hope this helps in the interim.
I'm sure PHP guru's would be able to translate the code to PHP.
The code can be found here. It's not PHP code but I'm sure PHP developers can work it out.
Steve
My running website