Hi - I have taken over the development and maintenance of an AspDotNetStoreFront website which utilises the Telerik RadEditor and have encountered an issue when updating a topic.
This issue is based around the auto completion of valid XHTML and it being saved to the database. I have researched various posts and information but cannot find any specific information which matches my problem.
the problem:
The client highlighted me to a page where the layout of the front end of the site was displaying incorrectly, and so viewing the code within the page I could see INVALID HTML <div> elements. Navigating to the admin area where the page information was stored, I could see the code within the RadEditor (HTML mode) and copied and pasted the code - running through it I could see that all opening <div> elements had their corresponding closing </div> elements.
having run a few tests, I can confirm the following:
opening an empty radeditor page, and typing within the HTML mode:
<div>
clicking update, this refreshes the page and updates the database - the RadEditor now displays <div></div> within the HTML mode window.
Checking the database - the value inserted is only <div> !!!
if I simply update the RadEditor again without changing anything, this then injects the full <div></div> as this is the value being passed from the editor to the SQL update statement.
So, if a customer accidentally inserts some invalid HTML, this will break their layout, but then viewing the code in the RadEditor, it has been corrected to be valid - but this is NOT what is stored in the database. Double updating could be a solution, but the client is NOT happy with this in any way (as small an action as it is - he doesnt not feel it is acceptable).
PLEASE can you help to diagnose what this is doing and why.
in an ideal world I would like to turn off the auto XHTML (something I believe is not possible based on previous forum requests from others) - or at least fix the problem so it sorts out the XHTML BEFORE it submits to the database, therefore saving the correct HTML code.
Your help is very much appreciated.
This issue is based around the auto completion of valid XHTML and it being saved to the database. I have researched various posts and information but cannot find any specific information which matches my problem.
the problem:
The client highlighted me to a page where the layout of the front end of the site was displaying incorrectly, and so viewing the code within the page I could see INVALID HTML <div> elements. Navigating to the admin area where the page information was stored, I could see the code within the RadEditor (HTML mode) and copied and pasted the code - running through it I could see that all opening <div> elements had their corresponding closing </div> elements.
having run a few tests, I can confirm the following:
opening an empty radeditor page, and typing within the HTML mode:
<div>
clicking update, this refreshes the page and updates the database - the RadEditor now displays <div></div> within the HTML mode window.
Checking the database - the value inserted is only <div> !!!
if I simply update the RadEditor again without changing anything, this then injects the full <div></div> as this is the value being passed from the editor to the SQL update statement.
So, if a customer accidentally inserts some invalid HTML, this will break their layout, but then viewing the code in the RadEditor, it has been corrected to be valid - but this is NOT what is stored in the database. Double updating could be a solution, but the client is NOT happy with this in any way (as small an action as it is - he doesnt not feel it is acceptable).
PLEASE can you help to diagnose what this is doing and why.
in an ideal world I would like to turn off the auto XHTML (something I believe is not possible based on previous forum requests from others) - or at least fix the problem so it sorts out the XHTML BEFORE it submits to the database, therefore saving the correct HTML code.
Your help is very much appreciated.