This is a migrated thread and some comments may be shown as answers.

Character replacement when attribute value contains a new line

1 Answer 31 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Gregory Gulik
Top achievements
Rank 1
Gregory Gulik asked on 21 Feb 2014, 07:48 PM
When switching between Design and Html views, html that contains a newline in a tag's attribute value, the tags <> will be converted to &lt; &gt;

This behavior can be replicated in the current RadEditor Demo

Initial Html:
<html>
    <head>
    </head>
    <body>
        <div class="class_a
        class_b">
        Hello
        </div>
    </body>
</html>

After switching between Design and Html modes its converted to:
<html>
    <head>
    </head>
    <body>
        &lt;div class="class_a
        class_b"&gt;
        Hello
    </body>
</html>

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 25 Feb 2014, 02:45 PM
Hello Gregory,

You can resolve this by disabling the ConvertCharactersToEntities content filter. You can test the behavior of all built-in content filters with this live example. To disable the filter you can use the following example line of code:
RadEditor1.DisableFilter(EditorFilters.ConvertCharactersToEntities);


Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Gregory Gulik
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or