Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in Podcast App #16

Open
skarpik opened this issue Apr 23, 2022 · 3 comments
Open

Bugs in Podcast App #16

skarpik opened this issue Apr 23, 2022 · 3 comments

Comments

@skarpik
Copy link

skarpik commented Apr 23, 2022

Hello - I have created a website for a small museum to host its podcasts. I am using v2.1.2 in 2sxc v13.05. I want to submit the podcasts to Apple, but I am having trouble with the RSS feed. When I validate the RSS on:

https://www.castfeedvalidator.com/

I get this message:

FATAL: This server does not support HTTP head requests. Head request support required for Apple Podcasts. Did not finish feed tests.

I looked at the RSS info and it looks good to me (I will add it at the bottom of this message). I suspect that the problem is either something missing (or wrong) in my web.config or some setting is not right at my web hosting service. I have Googled "head request" and "DNN" and found nothing useful (similarly for "head request" and "IIS").

I was wondering whether you have had any experience with this problem and can offer any advice. If it is my web host that is lacking, perhaps you can suggest one that works for this purpose (I am currently using DNN4Less.com).

Thank you.

BTW - The app is very nice.


https://podcasts.thercrmuseum.ca/api/2sxc/app/PodCast2/api/PodCast/Rss?pageid=34&moduleId=390&channelid=2484

@skarpik
Copy link
Author

skarpik commented Apr 25, 2022

Although this doesn't solve my problem, it is something that will cause problems for categories with ampersands. According to Apple, one must pay attention to escaping ampersands:

Failure to properly program ampersands. When specifying categories and subcategories, be sure to properly escape ampersands. For example:

Incorrect Formatting
<itunes:category text="Society & Culture" />

Correct Formatting
<itunes:category text="Society &amp; Culture" />

(Source: https://podcasters.apple.com/support/829-validate-your-podcast)

For this reason, I suggest the following modifications:

Add at top:
using System.Net;

Replace:

//AddAttribute(itunesCategory, "text", Content.Category.MainCategory);
AddAttribute(itunesCategory, "text", WebUtility.HtmlEncode(Content.Category.MainCategory));

//AddAttribute(itunesSubCategory, "text", Content.Category.SubCategory);
AddAttribute(itunesSubCategory, "text", WebUtility.HtmlEncode(Content.Category.SubCategory));

//AddTag(itemNode, "category", Text.Has(Content.Category.SubCategory) ? Content.Category.SubCategory : Content.Category.MainCategory);
AddTag(itemNode, "category", Text.Has(Content.Category.SubCategory) ? WebUtility.HtmlEncode(Content.Category.SubCategory) : WebUtility.HtmlEncode(Content.Category.MainCategory));

@skarpik skarpik changed the title Problem submitting Podcast to Apple Bugs in Podcast App Apr 25, 2022
@iJungleboy
Copy link
Collaborator

I think the correct solution would be that all tags added should have ampersands corrected.

This could be a bug in RazorBlade. @tvatavuk could you look into this? Pls discuss before we fix, as I see similarities with the JsonLD headers.

@tvatavuk
Copy link

This part of app code depends on System.Xml with XmlElement and XmlAttribute and does not use Razor.Blade.
As was already suggested by @skarpik, solution is to update app code to XML encode values for attributes, etc... eg.

  private XmlAttribute AddAttribute(XmlElement parent, string name, string value) {
    var node = parent.OwnerDocument.CreateAttribute(name);
        node.Value = System.Net.WebUtility.HtmlEncode(value);
    return parent.Attributes.Append(node);
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants