Setting the iTunes Category to a field with an ampersand outputs additional "amp;" text after the HTML entity.

For example, using "Religion & Spirituality/Christianity" text as the category outputs the following XML.

<itunes:category text="Religion &amp;amp;amp; Spirituality"><itunes:category text="Christianity"/></itunes:category>

It would seem that the first category should be "Religion &amp; Spirituality" in the feed output, without the extra "amp;amp;" appended.

CommentFileSizeAuthor
#2 3029877-2.patch1.01 KBrodrigoaguilera

Comments

TheLioness22 created an issue. See original summary.

rodrigoaguilera’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

I experienced the same.

The text is already htmlencoded and the podcast module encodes it again and the the render system for the attributes.

Here is my suggestions for changing the code

geoffreyr’s picture

+1 for the patch in #2.

shane birley’s picture

Patch applied for testing.

shane birley’s picture

I haven't run into any problems so far. Thumbs up!

shane birley’s picture

However, I will mention that this issue is making it difficult to test this fully as the itunes:category field isn't being rendered properly.

fozzieblue’s picture

Category: Bug report » Support request

I really appreciate the podcast module. I've applied three other patches successfully, but the multiple top-level categories patch is failing.

I'm using:

https://www.drupal.org/files/issues/2019-05-02/podcast-3052077-multi_top_level_categories-7.patch (iTunes supports multiple top-level categories)
patch '-p1' --no-backup-if-mismatch -d 'web/modules/contrib/podcast' < '/var/folders/02/g3wl6xpj5hn6z0n4x2g650m00000gn/T/5e29ccdc48e5a.patch'
patching file src/Plugin/views/style/Rss.php
Hunk #1 succeeded at 297 (offset 39 lines).
Hunk #2 FAILED at 310.
Hunk #3 FAILED at 336.

2 out of 3 hunks FAILED -- saving rejects to file src/Plugin/views/style/Rss.php.rej

patch '-p0' --no-backup-if-mismatch -d 'web/modules/contrib/podcast' < '/var/folders/02/g3wl6xpj5hn6z0n4x2g650m00000gn/T/5e29ccdc48e5a.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Plugin/views/style/Rss.php b/src/Plugin/views/style/Rss.php
|index 3cb4fd1..89f7466 100644
|--- a/src/Plugin/views/style/Rss.php
|+++ b/src/Plugin/views/style/Rss.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

3 out of 3 hunks ignored

patch '-p2' --no-backup-if-mismatch -d 'web/modules/contrib/podcast' < '/var/folders/02/g3wl6xpj5hn6z0n4x2g650m00000gn/T/5e29ccdc48e5a.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Plugin/views/style/Rss.php b/src/Plugin/views/style/Rss.php
|index 3cb4fd1..89f7466 100644
|--- a/src/Plugin/views/style/Rss.php
|+++ b/src/Plugin/views/style/Rss.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

3 out of 3 hunks ignored

patch '-p4' --no-backup-if-mismatch -d 'web/modules/contrib/podcast' < '/var/folders/02/g3wl6xpj5hn6z0n4x2g650m00000gn/T/5e29ccdc48e5a.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/Plugin/views/style/Rss.php b/src/Plugin/views/style/Rss.php
|index 3cb4fd1..89f7466 100644
|--- a/src/Plugin/views/style/Rss.php
|+++ b/src/Plugin/views/style/Rss.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.

3 out of 3 hunks ignored

Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-05-02/podcast-3052077-multi_top_level_categories-7.patch

This is the first time I've added a patch on my own. I hope posting here was the correct next move.

shane birley’s picture

@fozzieblue,

Can you take a peek at this issue? Essentially, I would like to confirm that you have copied the theme files from the module's templates folder to the active theme's directory?

fozzieblue’s picture

@shane-birley

Thanks for replying! Yes, I've copied all 5 of the templates from the podcast module templates folder into our custom theme's templates > views folder (themes > custom > npl > templates > views). I did that before I added the three patches that were successful.

  • rodrigoaguilera committed 836565c on 8.x-1.x
    Issue #3029877 by rodrigoaguilera, Shane Birley, TheLioness22,...
rodrigoaguilera’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Status: Needs review » Fixed

Applied the patch at #2

Thank you for testing!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.