Hello,

I just found the bug below in 7.10. There was no report for it, or at least I couldn't find.

An "&" ampersand in the taxonomy RSS feed of a term ist double-encoded.

For example:

<channel>
    <title>Vocabulary term &amp;amp; its ampersand</title>
    ...
</channel>

The path is: /taxonomy/term/[term-id]/*/feed

Other special chars likely behave similar.

Comments

xjm’s picture

Version: 7.10 » 8.x-dev
Issue tags: +Needs tests, +Needs backport to D7

Hum, interesting little bug. Moving to D8 and tagging for backport.

droplet’s picture

Status: Active » Postponed (maintainer needs more info)

can't reproduce.

terms saving & in DB and only one check_plain in format_rss_item before output.

xjm’s picture

So @Shnapoo, can you provide steps to reproduce this issue, starting from "Install Drupal core"?

Anonymous’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 7.x-3.1
Component: taxonomy.module » feed displays
Status: Postponed (maintainer needs more info) » Active
Issue tags: -Needs tests, -Needs backport to D7

Oops, it's the views taxomony override, not the core module.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Well views doesn't provide a way to build feeds of taxonomy terms, maybe that's another contrib module.

Anonymous’s picture

It's the view "Taxonomy term" (taxonomy_term) provided by views 3. The term is insert as feed-title (<title>).

I just found out...
- it looks fine with /taxonomy/term/81/feed
- it is double-encoded when using /taxonomy/term/81/*/feed

I'll strive to do more tests later. It is a very complex drupal installation. For me as a novice it's hard to understand what other modules might be involved or if it's caused by the theme (using Omega theme as base) or whatever. Will have to read some docs about taxonomy I guess.

Anonymous’s picture

Unfortunately now after searching a bit, all I can say is the feed created via views has double encoded HTML entities in the title, while the original taxonomy feed has not. It's only when a depth parameter is provided.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
jcisio’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new441 bytes

It's because in views_handler_field_node, the method sanitize_value() is used to add a check_plain() to the node title.

helmo’s picture

StatusFileSize
new1.17 KB

The same problem appears with rss item title. See template_preprocess_views_view_row_rss()

Here's an updated patch.

sokrplare’s picture

Didn't seem to do the trick for me, but I didn't test in depth - patch applied cleanly against 3.11 at least!

chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 5 year old patch in #10 to theme.in does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.

Checking patch theme/theme.inc...
error: while searching for:
  else {
    $title = $view->get_title();
  }
  $vars['title'] = check_plain($title);

  // Figure out which display which has a path we're using for this feed. If there isn't
  // one, use the global $base_url

error: patch failed: theme/theme.inc:883
error: theme/theme.inc: patch does not apply
dimaro’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new865 bytes

I recently had to use this patch in a project...
#10 rerolled (No interdiff needed)
I hope that if someone is using this patch, it will be useful.

bohus ulrych’s picture

Hello,
I've found this patch helpful - I faced exactly same issue.
In my case it was node title causing this. Patched Views version = "7.x-3.23" works well now.
Note: I'm using also module title (version = "7.x-1.0-alpha9")