Add proper HTML tags support in XSLT

This commit is contained in:
~lucidiot 2021-01-23 22:43:48 +00:00
parent eb55d6fa0b
commit 8e3c8ec59b
3 changed files with 7 additions and 6 deletions

View File

@ -59,10 +59,11 @@
<pubDate>Wed, 16 Dec 2020 07:40:22 +0000</pubDate>
<guid isPermaLink="false">XSLT</guid>
<category domain="https://envs.net/~lucidiot/rsrsss/">Meta</category>
<description>
<p>I added <a href="style.xsl">an XSLT stylesheet</a> to this RSS feed! This means that when you open this feed in a web browser that does not support subscribing to RSS feeds, you will instead get a nice looking page without me ever writing actual raw HTML. In older or less common web browsers that still support RSS subscriptions (as every good web browser should), such as Pale Moon, you will still get the default page that asks you if you want to subscribe.</p>
<category domain="https://envs.net/~lucidiot/rsrsss/">XSL</category>
<description><![CDATA[
<p>I added <a href="https://envs.net/~lucidiot/rsrsss/style.xsl">an XSLT stylesheet</a> to this RSS feed! This means that when you open this feed in a web browser that does not support subscribing to RSS feeds, you will instead get a nice looking page without me ever writing actual raw HTML. In older or less common web browsers that still support RSS subscriptions (as every good web browser should), such as Pale Moon, you will still get the default page that asks you if you want to subscribe.</p>
<p>Some of my friends had mentioned adding RSS to their static site generators was hard; how about turning your index page into the RSS feed, and letting browsers generate the HTML for you?</p>
</description>
]]></description>
</item>
<item>

View File

@ -6,7 +6,7 @@ article {
clear: both;
background-color: whitesmoke;
border-radius: 5px;
padding: 3px 10px;
padding: 3px 10px 5px;
margin-bottom: 1em;
}

View File

@ -5,7 +5,7 @@
xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:admin="http://webns.net/mvcb/">
<xsl:output method="html" />
<xsl:output method="html" doctype-system="about:legacy-compat" />
<xsl:template match="/">
<html>
@ -74,7 +74,7 @@
</xsl:if>
<xsl:if test="description">
<p><xsl:copy-of select="description" /></p>
<xsl:value-of select="description" disable-output-escaping="yes" />
</xsl:if>
</article>
</xsl:template>