summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Szczerbiak <a.szczerbiak@samsung.com>2017-02-01 06:49:24 +0100
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:28 +0900
commit9e4a7fa0edf7eecf49f344080ac028b399789dc7 (patch)
tree360476f094c1e62cb968a054a00872cd01477f84
parentdecb59df79b15067ad4d945b1cbef54d2273e6ee (diff)
downloadxamarin-forms-9e4a7fa0edf7eecf49f344080ac028b399789dc7.tar.gz
xamarin-forms-9e4a7fa0edf7eecf49f344080ac028b399789dc7.tar.bz2
xamarin-forms-9e4a7fa0edf7eecf49f344080ac028b399789dc7.zip
Fix ampersand handling in Span class
Ampersand character ('&') has not been handled correctly, causing the text handled by Span class to display solely the initial part, up to the first '&' character. This bug has been spotted in Xamarin.Samples.TipCalc application, where the displayed label's caption stated "Food ", but pre-programmed string was "Food & Drink". This commit makes the Span class handle the '&' character correctly, which fixes that bug. Change-Id: I0e17d39fbfae6a5ef5eea585a5229c4a5b0cca7e Signed-off-by: Adam Szczerbiak <a.szczerbiak@samsung.com>
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Span.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Span.cs b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
index 028e9db9..41a20b7d 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Span.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
@@ -318,7 +318,8 @@ namespace Xamarin.Forms.Platform.Tizen.Native
string ConvertTags(string text)
{
- return text.Replace("<", "&lt;")
+ return text.Replace("&", "&amp;")
+ .Replace("<", "&lt;")
.Replace(">", "&gt;")
.Replace(Environment.NewLine, "<br>");
}