RadEditor adding extra
tags when toggling between the text/html views
version: Sitefinity v 5.1
browser: IE11
os: Windows 8
When editing a Content Block, extra <br></br> tags are added to the HTML when toggling between text and html views. This seems to be a similar issue, although I'm unsure of what the actual fix was.
Does anyone have a straightforward solution for this?
Thank you
I had the same issue in 5.4. I ended up calling this javascript function on the content to remove the breaks, as Telerik could not fix it right away. I'm not sure if it's fixed in 7.1.
function
RemoveHTMLLastLineBreak(strHTML)
var
index = strHTML.lastIndexOf(
"<br>"
);
if
(index > -1)
strHTML = strHTML.substring(0, index);
index = strHTML.lastIndexOf(
"<br />"
);
if
(index > -1)
strHTML = strHTML.substring(0, index);
return
strHTML;
Here is a post about it too.
Thanks for your response; unfortunately, the line breaks are not necessarily at the end of content blocks. The scenario that I can reproduce is adding <br></br> tags in the middle of a content block.
Hello all,
First we had problem which has fixed in Sitefinity 5.0 SP1.
http://feedback.telerik.com/Project/153/Feedback/Details/100347-content-block-renders-extra-br-tag
Then we encountered problem in Sitefinity 7.0 version which was fixed in the internal build 7.1.5208:
http://feedback.telerik.com/Project/153/Feedback/Details/128273-contentblock-renders-extra-br-tag-in-sitefinity-7-0
The fix is also included in the official Sitefinity 7.2 release.
There is another bug which we have logged in our Feedback portal where unwanted tags are added each time a content block is being edited and updated using the Inline Editing tool. Hopefully we will be able to fix this issue for our future releases. Here is the link to the feedback portal where this issue has been logged.
You could upgrade your project to Sitefinity 7.2 following our upgrade procedures where the first two problems are resolved.
Moreover, you could review the workarounds provided in this forum thread.
Regards,
Stefani Tacheva
Telerik
use ContentFilters="None" in telerik rad editor property