Syndicator Blog

RSS

Chrome 158 Drops XSLT, and Styled RSS Feeds Turn Back Into Raw XML

Some blogs dress up their RSS feed for people who click on it by accident. A line at the top of the feed points to an XSL stylesheet, and the browser turns the XML into a friendly page that explains what a feed is and how to subscribe. Starting with Chrome 158, that line stops working.

Google's deprecation page puts it plainly: "We intend to remove support from version 158 (November 17, 2026)." That's tomorrow. From then on, XSLT is off in Chrome stable for everyone except sites in the origin trial and companies using the enterprise policy. Both of those escape hatches end with Chrome 176 on August 17, 2027, when XSLT is disabled for all users.

What goes away

Two things are removed. One is the XSLTProcessor class in JavaScript. The other is the XSLT processing instruction, the line many styled feeds start with:

<?xml-stylesheet type="text/xsl" href="/feed.xsl"?>

Google's stated reason is security. The XSLT code in browsers is an aging C and C++ library, libxslt, and the page cites CVEs against it. It also says only about 0.02% of page loads use XSLT at all, and under 0.001% use the processing instruction. The same page says the Firefox and WebKit projects have signaled plans to remove XSLT from their engines too, so Chrome is first in line and other browsers are expected to follow.

XML itself stays. So does the CSS version of the same processing instruction, which matters below.

What a styled feed looks like after the switch

You can see the result today. We built a small RSS file with an XSL stylesheet and opened it in Chromium 153 twice, once normally and once launched with --disable-features=XSLT.

With XSLT on, the feed renders as an HTML page with a heading and a list of posts. The console already warns that "XSLTProcessor and XSLT Processing Instructions have been deprecated by all browsers."

With XSLT off, the page shows this line above the raw XML tree:

This document cannot be formatted as intended. It uses XSLT, which the browser does not support. You might be able to install a browser extension that allows you to view it.

The console says the feature has "been removed in this browser" and typeof XSLTProcessor comes back undefined. So scripts that call it will throw, and visitors who click your feed link see an error message telling them to install an extension. That's a worse first impression than plain unstyled XML.

Feed readers aren't affected. They parse the XML themselves and never run the stylesheet, so subscribers keep getting posts. The break is only for humans who open the feed in a browser.

Option 1, a CSS stylesheet

The cheapest fix keeps the processing instruction and swaps the type to CSS. Chrome's page states that <?xml-stylesheet ?> with type="text/css" is not affected.

<?xml-stylesheet type="text/css" href="/feed.css"?>

CSS can't add text or turn <link> elements into clickable links, but it can hide the noise and make titles readable:

rss { display: block; font-family: system-ui, sans-serif; max-width: 40rem; margin: 2rem auto; }
channel > title { display: block; font-size: 2rem; font-weight: bold; }
channel > link, channel > description, item > link { display: none; }
item { display: block; margin: 1rem 0; }
item > title { display: block; font-size: 1.2rem; }

In our test, this file rendered the same way with XSLT on and off. The channel title came out at 32px in both runs, so the styles applied. For Atom, the selectors become feed, feed > title, entry and entry > title.

Option 2, transform at build time

If you want the full HTML page, run the XSLT yourself and publish the result as a normal web page. Your existing stylesheet keeps working, it just runs on your machine or build server instead of in the visitor's browser. This short Python script uses lxml:

import sys
from lxml import etree

feed = etree.parse(sys.argv[1])
xslt = etree.XSLT(etree.parse(sys.argv[2]))
print(str(xslt(feed)))

Run it as python3 transform.py feed.xml feed.xsl > feed.html and our test stylesheet produced the same heading and post list Chrome used to render. Publish that as something like /feed/about/ and link to it from your site. The feed URL itself goes back to plain XML with no processing instruction.

This is the option Google lists first. It also suggests moving to JSON or using a JavaScript XSLT engine such as SaxonJS. For a feed, those are more work than the problem deserves.

Option 3, a polyfill

Google's page describes a WASM-based polyfill that replaces XSLTProcessor, and shows it loaded with one <script> tag placed as a direct child of the feed's root element. It names the file xslt-polyfill.min.js but doesn't point to a single official repository, so check where you're getting it from before you ship it in every feed response. There's also a Chrome extension of the same name for people who want to read XSLT pages themselves.

Google says this keeps feed readers working. Still, it means shipping a script tag to every reader on every poll, and we'd rather use one of the first two options.

The fix that helps most people

Google's recommendation for feeds is the simplest of all: stop sending people to the raw feed. Put a <link rel="alternate" type="application/rss+xml"> tag in your HTML head so readers can find the feed from your home page. Many readers let people subscribe by pasting a site address, and autodiscovery handles the rest. A visible "RSS" link can then point to a short HTML page explaining what a feed is, with the feed URL to copy.

For the record, nothing changes on Syndicator. The aggregated feed at syndicator.net/feed.xml and this blog's feed are plain XML with no stylesheet line, and the home pages already carry autodiscovery tags.

A quick check for your own site

Open your feed URL with curl and look at the first few lines:

curl -s https://example.com/feed.xml | head -3

If you see type="text/xsl", Chrome 158 visitors who click that link get the error message instead of your page. The CSS swap takes five minutes, so there's little reason to wait.