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

Feed Preview parses HTML code in item.description tags #98

Open
anewuser opened this issue Jul 22, 2022 · 2 comments
Open

Feed Preview parses HTML code in item.description tags #98

anewuser opened this issue Jul 22, 2022 · 2 comments

Comments

@anewuser
Copy link
Contributor

anewuser commented Jul 22, 2022

Compare:

Please make iframes in descriptions display only the code too.

In the first example, the Feed Preview page displays the generated HTML code as plain text. In the second example, it parses the generated HTML code.

@onli
Copy link
Member

onli commented Jul 25, 2022

I think this follows the spec currently. Have a look at the item in the second feed itself, not the page preview:

 <item>
      <title>Audio</title>
      <link>https://dailyjidols.tumblr.com/post/690686976630915072</link>
      <description>&lt;iframe class=&quot;tumblr_audio_player tumblr_audio_player_690686976630915072&quot; src=&quot;https://dailyjidols.tumblr.com/post/690686976630915072/audio_player_iframe/dailyjidols/tumblr_rczf7b6o5B1v9j3tc?audio_file=https%3A%2F%2Fa.tumblr.com%2Ftumblr_rczf7b6o5B1v9j3tco1.mp3&quot; frameborder=&quot;0&quot; allowtransparency=&quot;true&quot; scrolling=&quot;no&quot; width=&quot;540&quot; height=&quot;169&quot;&gt;&lt;/iframe&gt;</description>
      <category>CoCo</category>
      <category>throwback</category>
      <category>media</category>
      <category>audio</category>
      <pubDate>Sun, 24 Jul 2022 19:20:30 -0000</pubDate>
      <guid isPermaLink="true">https://dailyjidols.tumblr.com/post/690686976630915072</guid>
      <dc:date>2022-07-24T19:20:30Z</dc:date>
    </item>

The html in the description is escaped, exactly like it's supposed to. Do I have a mixup in my thinking?

@anewuser
Copy link
Contributor Author

anewuser commented Jul 26, 2022

I do agree with you. The resulting HTML code should always be escaped both in description and content tags of actual RSS feeds. Pipes does this properly in these examples, and everything works as expected on my feed reader.

My report was actually about the "Feed Preview" page itself:

Resulting RSS Feed Preview page
First example ✔️ Escaped HTML in content:encode ✔️ Unescaped HTML displayed as plain text (as in the pipe editor).
👍 It has always worked like this, and is useful for analyzing the final HTML code.
Second example ✔️ Escaped HTML in description ❌ HTML is parsed and added to the DOM of the Feed Preview page.
👎 This makes it less practical to analyze the code.

Sorry for not being clear at first and mentioning only iframes.

@anewuser anewuser changed the title Feed preview embeds iframes in item.description tags Feed Preview parses HTML code in item.description tags Jul 26, 2022
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

2 participants