diff --git a/webapp_search.py b/webapp_search.py
index 1213593c3..6936a9f01 100644
--- a/webapp_search.py
+++ b/webapp_search.py
@@ -330,6 +330,42 @@ def html_search_shared_items(css_cache: {}, translate: {},
return shared_items_form
+def _html_common_emoji(base_dir: str, no_of_emoji: int) -> str:
+ """Shows common emoji
+ """
+ common_emoji_filename = base_dir + '/accounts/common_emoji.txt'
+ if not os.path.isfile(common_emoji_filename):
+ return ''
+ common_emoji = None
+ try:
+ with open(common_emoji_filename, 'r') as fp_emoji:
+ common_emoji = fp_emoji.readlines()
+ except OSError:
+ print('EX: html_common_emoji unable to load file')
+ return ''
+ if not common_emoji:
+ return ''
+ line_ctr = 0
+ ctr = 0
+ html_str = ''
+ while ctr < no_of_emoji and ctr < len(common_emoji):
+ emoji_name = common_emoji[ctr].split(' ')[1].replace('\n', '')
+ emoji_filename = base_dir + '/emoji/' + emoji_name + '.png'
+ if os.path.isfile(emoji_filename):
+ # NOTE: deliberately no alt text, so that without graphics only
+ # the emoji name shows
+ html_str += \
+ '' + \
+ '