diff --git a/content.py b/content.py index ebbbcc76f..8b140c1f4 100644 --- a/content.py +++ b/content.py @@ -31,20 +31,6 @@ def removeHtmlTag(htmlStr: str, tag: str) -> str: return htmlStr -def setHtmlTag(htmlStr: str, tag: str, value: str) -> str: - """Sets the value of a given tag from a html string - """ - matchStr = ' ' + tag + '="' - if matchStr not in htmlStr: - return htmlStr - sections = htmlStr.split(matchStr, 1) - if '"' not in sections[1]: - return htmlStr - htmlStr = sections[0] + matchStr + value + '"' + \ - sections[1].split('"', 1)[1] - return htmlStr - - def removeQuotesWithinQuotes(content: str) -> str: """Removes any blockquote inside blockquote """ diff --git a/newsdaemon.py b/newsdaemon.py index 025582b0b..df393ab03 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -12,7 +12,6 @@ import datetime from collections import OrderedDict from newswire import getDictFromNewswire from posts import createNewsPost -from content import setHtmlTag from content import removeHtmlTag from content import dangerousMarkup from utils import loadJson @@ -135,8 +134,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, # remove image dimensions if '