Bug 35446 - Error: attribute values cannot contain '<'
Summary: Error: attribute values cannot contain '<'
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.5.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-01 14:06 UTC by marc
Modified: 2015-11-18 03:26 UTC (History)
4 users (show)

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

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:

Description marc 2015-11-01 14:06:29 UTC
I´m trying to define a Xamarin.Forms button control (I left out other attributes):

<Button Text="<" />

I want to set the Text: "<". But the compiler/parser complains as if it thinks a new XAML-Tag would begin. At least if I am declaring the text via the XAML. Defining the Text via the code-behind in C#, there is no problem with the text "<". The button is just rendered alright. 

Seems to be a XAML parsing problem.
Comment 1 Stephane Delcroix 2015-11-18 03:26:17 UTC
See http://stackoverflow.com/questions/866706/which-characters-are-invalid-unless-encoded-in-an-xml-attribute and http://www.w3.org/TR/xml/#NT-AttValue

"<" is not a valid attribute value in XML, so it's not a valid attribute value in XAML