diff --git a/webapp_search.py b/webapp_search.py
index 42d9cf2a..74aa6aa4 100644
--- a/webapp_search.py
+++ b/webapp_search.py
@@ -24,7 +24,7 @@ from feeds import rss2TagFooter
from webapp_utils import getAltPath
from webapp_utils import getIconsDir
from webapp_utils import getImageFile
-from webapp_utils import htmlHeader
+from webapp_utils import htmlHeaderWithExternalStyle
from webapp_utils import htmlFooter
from webapp_utils import getSearchBannerFile
from webapp_utils import htmlPostSeparator
@@ -50,13 +50,10 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
emojiCSS = getCSS(baseDir, cssFilename, cssCache)
if emojiCSS:
- if httpPrefix != 'https':
- emojiCSS = emojiCSS.replace('https://',
- httpPrefix + '://')
emojiLookupFilename = baseDir + '/emoji/emoji.json'
# create header
- emojiForm = htmlHeader(cssFilename, emojiCSS)
+ emojiForm = htmlHeaderWithExternalStyle(cssFilename, emojiCSS)
emojiForm += '
' + \
translate['Emoji Search'] + \
'
'
@@ -119,11 +116,8 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
sharedItemsCSS = getCSS(baseDir, cssFilename, cssCache)
if sharedItemsCSS:
- if httpPrefix != 'https':
- sharedItemsCSS = \
- sharedItemsCSS.replace('https://',
- httpPrefix + '://')
- sharedItemsForm = htmlHeader(cssFilename, sharedItemsCSS)
+ sharedItemsForm = \
+ htmlHeaderWithExternalStyle(cssFilename, sharedItemsCSS)
sharedItemsForm += \
'' + translate['Shared Items Search'] + \
'
'
@@ -296,7 +290,7 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
profileStyle = getCSS(baseDir, cssFilename, cssCache)
- emojiStr = htmlHeader(cssFilename, profileStyle)
+ emojiStr = htmlHeaderWithExternalStyle(cssFilename, profileStyle)
emojiStr += '\n'
emojiStr += '
\n'
emojiStr += '
\n'
@@ -338,14 +332,7 @@ def htmlSearch(cssCache: {}, translate: {},
profileStyle = getCSS(baseDir, cssFilename, cssCache)
- if not os.path.isfile(baseDir + '/accounts/' +
- 'follow-background.jpg'):
- profileStyle = \
- profileStyle.replace('background-image: ' +
- 'url("follow-background.jpg");',
- 'background-image: none;')
-
- followStr = htmlHeader(cssFilename, profileStyle)
+ followStr = htmlHeaderWithExternalStyle(cssFilename, profileStyle)
# show a banner above the search box
searchBannerFile, searchBannerFilename = \
@@ -520,11 +507,6 @@ def htmlHashtagSearch(cssCache: {},
cssFilename = baseDir + '/epicyon.css'
hashtagSearchCSS = getCSS(baseDir, cssFilename, cssCache)
- if hashtagSearchCSS:
- if httpPrefix != 'https':
- hashtagSearchCSS = \
- hashtagSearchCSS.replace('https://',
- httpPrefix + '://')
# ensure that the page number is in bounds
if not pageNumber:
@@ -540,7 +522,8 @@ def htmlHashtagSearch(cssCache: {},
endIndex = noOfLines - 1
# add the page title
- hashtagSearchForm = htmlHeader(cssFilename, hashtagSearchCSS)
+ hashtagSearchForm = \
+ htmlHeaderWithExternalStyle(cssFilename, hashtagSearchCSS)
if nickname:
hashtagSearchForm += '\n' + \
'