diff options
author | Sebastian Celis <sebastian@sebastiancelis.com> | 2017-12-31 00:36:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-31 00:36:40 +0300 |
commit | 7a7ca59c2dbc8d531fff93fa3ccf0d745c2a632c (patch) | |
tree | 5b7cba26aea6fdc9cfbf3dfcbb171d479a2e7e47 /README.md | |
parent | c2b517707a9e9bba267aea8f950c551c86b26dcd (diff) | |
parent | b5cd295e3a82ddcb5fb4e6540805815d5ac2e686 (diff) |
Merge pull request #228 from sebastianludwig/212-improvement
Improved Android HTML escaping
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -78,7 +78,12 @@ Twine currently supports the following output formats: * [iOS and OS X String Resources][applestrings] (format: apple) * [Android String Resources][androidstrings] (format: android) - * Supports [basic styling][androidstyling] with \<b\>, \<i\>, \<u\> and \<a\> links. These tags will *not* be escaped. Use [`getText()`](https://developer.android.com/reference/android/content/res/Resources.html#getText(int)) to read these strings. Also tags inside `<![CDATA[` won't be escaped. See [\#212](https://github.com/scelis/twine/issues/212) for details. + * HTML tags will be escaped by replacing `<` with `<` + * Tags inside `<![CDATA[` won't be escaped. + * Supports [basic styling][androidstyling] with `<b>`, `<i>`, `<u>` and `<a>` links. + * These tags will *not* be escaped, if the string doesn't contain placeholders so you can reference them directly in your layouts or use [`getText()`](https://developer.android.com/reference/android/content/res/Resources.html#getText(int)) to read them programatically. + * These tags *will* be escaped, if the string contains placeholders. You can use [`getString()`](https://developer.android.com/reference/android/content/res/Resources.html#getString(int,%20java.lang.Object...)) combined with [`fromHtml`](https://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)) as shown in the [documentation][androidstyling] to display them. + * See [\#212](https://github.com/scelis/twine/issues/212) for details. * [Gettext PO Files][gettextpo] (format: gettext) * [jquery-localize Language Files][jquerylocalize] (format: jquery) * [Django PO Files][djangopo] (format: django) |