Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Removing code from DCT
System
I am trying to remove extra code added when generating pages when using the visual editor in TS 6.5, I am doing it with Formapi.
I am getting the value of the text field, parsing it and replacing unwanted code, my problem right now is getting that value saved back to the dcr data file. this is the code i am using:
NOTE: with this code i am removing: but eventualy i need to remove from the field all these: <meta content="MSHTML 6.00.6000.16890" name="GENERATOR" />
function removeExtraCode () {
//gets the value of the text field
var whole_body = String(IWDatacapture.getItem("/Page Content").getValue());
var strEscaped = escape(whole_body); //added to escape all caracters
//replace unwanted code
var newstrchanged = strEscaped.replace(/%26%2365279%3B%20/gi," ");
//unescape characters and save replace string to strfinal
var strfinal = unescape(newstrchanged);
}
IWEventRegistry.addFormHandler("Onsave" , removeExtraCode);
</script>
Find more posts tagged with
Comments
There are no comments yet