Skip to content

Commit

Permalink
Merge pull request #126 from transifex/add-android-inline-tags
Browse files Browse the repository at this point in the history
Add html INLINE_TAGS for android xml escaping
  • Loading branch information
fathineos authored Nov 22, 2018
2 parents ee9a8e7 + 71ac232 commit 82a01c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openformats/formats/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,11 @@ def _should_ignore(child):

# Escaping / Unescaping
# According to:
# http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling # noqa

INLINE_TAGS = ("xliff:g", "a", "annotation")
# https://developer.android.com/guide/topics/resources/string-resource#FormattingAndStyling
# https://developer.android.com/guide/topics/resources/string-resource#StylingWithHTML
INLINE_TAGS = ("xliff:g", "a", "annotation", "b", "em", "i", "cite", "dfn",
"big", "small", "font", "tt", "s", "strike", "del", "u",
"sup", "sub", "ul", "li", "br", "div", "span", "p")

@staticmethod
def escape(string):
Expand Down

0 comments on commit 82a01c2

Please sign in to comment.