Skip to content

Commit

Permalink
Merge pull request #78 from theletterd/fix_company_values_unicode_issue
Browse files Browse the repository at this point in the history
fix unicode issues
  • Loading branch information
rockdog authored Nov 8, 2021
2 parents 9e500ea + 31b992d commit f9f1c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/util/company_values_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_get_hashtag_value_mapping(self, mock_config):
@mock.patch('util.company_values.config')
def test_linkify_company_values(self, mock_config):
mock_config.COMPANY_VALUES = []
love_text = 'who wants to #liveForever?'
love_text = u'who wants to #liveForever? 😭'
linkified_value = util.company_values.linkify_company_values(love_text)
# should be the same, because there's no hashtags.
self.assertEqual(love_text, linkified_value)
Expand Down
2 changes: 1 addition & 1 deletion util/company_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_hashtag_value_mapping():

def linkify_company_values(love):
# escape the input before we add our own safe links
escaped_love = str(markupsafe.escape(love))
escaped_love = unicode(markupsafe.escape(love))
hashtag_value_mapping = get_hashtag_value_mapping()

# find all the hashtags.
Expand Down

0 comments on commit f9f1c47

Please sign in to comment.