It appears that when a feed item's title contains a properly encoded ampersand (&), it remains escaped when a node is created. Thus, a node whose title should be "This & That" displays as "This & That".

Comments

todddevice’s picture

Category: bug » support

Another data point that may be useful:

The enescaped & is being inserted into the node record as-is. This suggests that when the node is processed, filter_xss() or the like should be evaluating the node array before insert, but isn't.

jesss’s picture

Subscribing...

mustafau’s picture

Which parser are you using?
Can you give the feed's URL?

todddevice’s picture

Parser is SimplePie 1.1.1.

Example feed can be found at:

http://origin.eastbaymedia.com/~holden/example.xml

Thanks.

eyecon-1’s picture

Someone should take a stab at converting the cleanfeeds module to suck mode. That would solve the problem without adding weight to Feedapi.

alex_b’s picture

The ampers ands are showing up because the titles are piped through l() with out $html = TRUE. Is this something we can solve on feedapi level or is this the themer's responsibility?

ygg’s picture

I'm subscribing because I'm currently having the same issue.

I sort of pseudo fixed it, but running a str_replace on the title in my theme, but that only works on the teasers and pages not when I do a views list.

I see what you are saying alex_b. Would it be a simple going into the module and changing that? or what? I didn't realize this was a major bug until just now, and am kind of on a short deadline...site must launch in a week. This is about the only thing I have had left on it to figure out.

Please let me know if anyone figures this out soon. Thank you!

alex_b’s picture

@epstudios: You should be able to fix this easily on the theming layer. Depending on where your broken titles show up, you will have to modify the node template or override the theming function that is building the title.

alex_b’s picture

Title: Amperands in Titles » Ampersands (HTML codes) in Titles

Better title.

alex_b’s picture

Status: Active » Closed (won't fix)

No FeedAPI specific problem.

toemaz’s picture

Having the same issue here.
I didn't have the time to look into it yet, so sorry I can't contribute anything to this issue.

conniec’s picture

I've run into this problem all over drupal when using several different modules like when I pull in data feeds with ampersands in the titles. I've found that it doesn't happen with other html symbols, just ampersands. It seems to be a drupal core problem. I found a reference to it somewhere once, w/ a notation that it needed to be fixed, but, alas.....
http://drupal.org/node/302729

You may be able to do some strange contortions in contemplate or on your specific .tpl page to make it look right.

sapark’s picture

Component: Code » Code (general)

I had this problem and stumbled on this thread (I just use the RSS that comes with Drupal)

in taxonomy.module in function taxonomy_term_page around line 1384
change
$title = check_plain(implode(', ', $names));
to
$title = (implode(', ', $names));

*edit: this is just for a taxonomy term with ampersand, in the title