diff --git a/webapp_search.py b/webapp_search.py index b823e03d1..50d8dc8b8 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -82,6 +82,7 @@ def htmlSearchEmoji(cssCache: {}, translate: {}, customEmojiJson = loadJson(customEmojiLookupFilename) if customEmojiJson: emojiJson = dict(emojiJson, **customEmojiJson) + results = {} for emojiName, filename in emojiJson.items(): if searchStr in emojiName: @@ -89,6 +90,11 @@ def htmlSearchEmoji(cssCache: {}, translate: {}, for emojiName, filename in emojiJson.items(): if emojiName in searchStr: results[emojiName] = filename + '.png' + + if not results: + emojiForm += '
' + \ + translate['No results'] + '
' + headingShown = False emojiForm += '
' msgStr1 = translate['Copy the text then paste it into your post']