Image width

merge-requests/8/head
Bob Mottram 2020-10-11 11:25:19 +01:00
parent caafb4648c
commit f3c1482e87
2 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ def removeHtmlTag(htmlStr: str, tag: str) -> str:
def setHtmlTag(htmlStr: str, tag: str, value: str) -> str:
"""Removes a given tag from a html string
"""Sets the value of a given tag from a html string
"""
matchStr = ' ' + tag + '="'
if matchStr not in htmlStr:

View File

@ -135,7 +135,8 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
# remove image dimensions
if '<img' in rssDescription:
rssDescription = setHtmlTag(rssDescription, 'width', '10vw')
# set the width of the image
rssDescription = setHtmlTag(rssDescription, 'width', '100px')
rssDescription = removeHtmlTag(rssDescription, 'height')
followersOnly = False