keep single qoutes in format
I have some javascript in a format with single quotes. When I save the format it changes them to double quotes. Is there a way to prevent this? It looks like this:
function reloadGraph() {
document.getElementById('pdfParentDiv').innerHTML = "<iframe id='foo' src='http://shared.basinelectric.com'
style='height:395px; width:725px;' ></iframe>";
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Ryan Griffith on 08 Aug, 2012 01:09 PM
Hi,
I was able to reproduce this behavior in Cascade 7.0.3 and logged a potential defect so it can possibly be looked into further for a future release of Cascade. Feel free to track the progress of the issue using the link I have provided.
In the meantime, the following should work if you reverse the quotes:
Alternatively, your original code looks like it is not rewritten in a Velocity Format, so that could be a second option if you are not able to use the code above.
Please let us know if you have any questions.
Thanks.
3 Posted by webteam on 08 Aug, 2012 01:31 PM
Thanks for the reply. Had me scratching my head. Your alternative will work for now.
Support Staff 4 Posted by Ryan Griffith on 08 Aug, 2012 01:42 PM
Double quotes for attributes is a little more common, so it might be better to go with the code above.
It's definitely valid JavaScript and HTML; however. The rewriting could possibly be a result of a cleanup routine or a limitation of the XSLT processor. I also indicated in the issue that using escaped double quotes is not excepted, so I'm leaning towards possibly a limitation of XSLT.
I'm going to go ahead and close this discussion, please feel free to reply or comment to re-open this discussion if you have any additional questions.
Thanks.
Ryan Griffith closed this discussion on 08 Aug, 2012 01:42 PM.