Don't allow svg image attachments on new posts

merge-requests/30/head
Bob Mottram 2021-09-13 20:25:03 +01:00
parent ecb58665b4
commit d433180047
1 changed files with 4 additions and 1 deletions

View File

@ -298,8 +298,11 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
newPostImageSection += \
' <input type="file" id="attachpic" name="attachpic"'
formatsString = getMediaFormats()
# remove svg as a permitted format
formatsString = formatsString.replace(', .svg', '').replace('.svg, ', '')
newPostImageSection += \
' accept="' + getMediaFormats() + '">\n'
' accept="' + formatsString + '">\n'
newPostImageSection += ' </div>\n'
scopeIcon = 'scope_public.png'