Bug 40906 - CDATA ignored in XAML layout
Summary: CDATA ignored in XAML layout
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.2.0
Hardware: Macintosh All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-05 14:23 UTC by Ben Askren
Modified: 2017-07-04 12:21 UTC (History)
5 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot (17.71 KB, image/png)
2017-07-04 12:21 UTC, Neha Kharbade
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Ben Askren 2016-05-05 14:23:08 UTC
Sorry to bother but I believe I am in need of your help. On a XAML Xamarin.Forms.ContentPage, I am trying to put some (or all) of the content of a Xamarin.Forms.Label in a <![CDATA[ ]]> block. However, it appears that the CDATA contents are ignored. Below is the XAML ContentPage:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="CdataTest.CdataTestPage" Padding="20">
    <ContentPage.Content>
        <Label>
            <![CDATA[<b>Bold</b>]]> Test <![CDATA[<b>Bold</b>]]>
        </Label>
    </ContentPage.Content>
</ContentPage>


I am expecting the app to display:

  <b>Bold</b> Test <b>Bold</b>


However, it only displays:

  Test


I've uploaded a demo project (PCL iOS and Android) here: https://github.com/baskren/CDATA_Issue

Any insight as to what I am doing wrong would be greatly appreciated!
Comment 1 E.Z. Hart [MSFT] 2016-06-06 20:39:52 UTC
Confirmed up through 2.3.0.46-pre3
Comment 2 Stephane Delcroix 2017-01-18 14:07:32 UTC
see https://github.com/xamarin/Xamarin.Forms/pull/698
Comment 3 Stephane Delcroix 2017-01-26 08:31:23 UTC
this will be fixed in 2.3.5
Comment 4 Neha Kharbade 2017-07-04 12:21:13 UTC
Created attachment 23286 [details]
Screenshot

Verified this bug on latest build xamarin.forms 2.3.5-pre6 , app displayed 

"<b>Bold</b> Test <b>Bold</b>"

As this is expected result marking this bug as verified.

Build info gist link - https://gist.github.com/saurabh-paunikar/1a1a3e8143899b7b2ea9f8eedef4478d

please find attached screenshot.