mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-30 18:48:55 +01:00
Optional match on ending ;
This commit is contained in:
parent
3194b4cd87
commit
99ea7866c5
@ -30,7 +30,7 @@ function stripAllTags(html, shouldDecodeEntities = true) {
|
|||||||
module.exports.stripAllTags = stripAllTags
|
module.exports.stripAllTags = stripAllTags
|
||||||
|
|
||||||
function decodeHTMLEntities(strToDecode) {
|
function decodeHTMLEntities(strToDecode) {
|
||||||
return strToDecode.replace(/\&([^;]+);/g, function (entity) {
|
return strToDecode.replace(/\&([^;]+);?/g, function (entity) {
|
||||||
if (entity in entities) {
|
if (entity in entities) {
|
||||||
return entities[entity]
|
return entities[entity]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user