After upgrading to BE 1.4.15 I noticed a javascript popped up on my site. Looking futher into the errors it became clear the problem was related to the SyntaxHighlighter extension. I did some digging and the root cause of the problem lies in the Javascript Handler built into BE. I tried to follow what’s going on inside the StripWhitespace methods but soon ran out of patience. I will post an issue on the BE issues page but for now I need things to work. So after making some slight changes to the SyntaxHighlighter extension it is again ready for prime time.
Specifically I changed the following line:
return Utils.RelativeWebRoot + "js.axd?path=" + Utils.RelativeWebRoot + url;
with the following syntax:
return Utils.RelativeWebRoot + HttpUtility.UrlEncode(url);
And that was all that is needed to get things working again. I have previously mentioned that using web handlers is a better way to write code, but that only applies if things work.
One thing worth mentioning is that the SyntaxHighlighter JavaScript files are already compressed so the only real thing we are loosing out on by not using the JavaScript handler is the server side caching. I will keep trying to figure out the issue with the JavaScript that is causing a problem with the web handler but for now just update your ~/App_Code/ExtensionsSyntaxHighlighter.cs file and you should be good to go. Or you can just download the extension again and it will include the change.