Hi there
We recently experienced a bug in the XamRichTextEditor in version 16.2.20162.1006 (which our app is running productively on) and i also verified the same behavior in version 17.1.20171.1000 (the latest i have).
The problem is, that the XamRichtTextEditor (or maybe HtmlDocumentAdapter) uses region settings for parsing numeric values. So when the machine uses a "." (dot) in the regional settings for decimal seperator everything is fine. But if the machine is configured for Germany (de-de) as example, the decimal seperator is set to "," (comma). And then the XamRichTextEditor uses the "," for parsing numeric values in the HTML code. For the XamRichTextEditor, it does not make any difference when displaying the rich text. But for other controls we use, the visual representation for the HTML code is completly off, because the sizes of text, lines and so on is not rendered correctly.
And i also checked the CSS numeric syntax, and there is defined that a numeric value has to have a "." (dot) as decimal seperator.
https://www.w3.org/TR/css3-values/#numbers
"or more decimal digits followed by a dot (.) followed by one or more decimal digits and"
Please see attached screenshots.
Can you please check this as soon as possible and give us a fix or a workaround?Kind regards
Chris
4
Hello,
I was able to reproduce the issue and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 241748. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
Meanwhile as a workaround I can suggest you to change the NumberDecimalSeparator of the CurrentThread to "." in your project like this:
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("de-de"); cultureInfo.NumberFormat.NumberDecimalSeparator = "."; Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo;
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("de-de"); cultureInfo.NumberFormat.NumberDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo;
This should start generating valid html.
Please let me know if you need more information.
Sincerely,Teodor TenevSoftware Developer