mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-14 00:36:48 +00:00
Feed fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const { decode } = require('html-entities')
|
const { decode, encode } = require('html-entities')
|
||||||
|
|
||||||
// configure markdown-it
|
// configure markdown-it
|
||||||
const transformer = require('jstransformer')
|
const transformer = require('jstransformer')
|
||||||
@@ -20,7 +20,7 @@ const replacements = str => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const stripHTML = str => {
|
const stripHTML = str => {
|
||||||
return str && decode(str.replace(/(<([^>]+)>)/ig, '').trim().replace(/\n\s*/g, '\n'))
|
return str && encode(decode(str.replace(/(<([^>]+)>)/ig, '').trim().replace(/\n\s*/g, '\n')), { level: 'xml' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// slug
|
// slug
|
||||||
|
|||||||
Reference in New Issue
Block a user