This project is read-only.

Code formating and casting

Topics: Business Logic Layer, Controls
Feb 7, 2014 at 9:05 PM
Be 2.9.1, I am noticing any all html code is parsed using lower case; this is OK, however, its also casting code added inside a <pre></pre> tags, also, its adding a self closing to tags to C# code

class myclass {
public IList<Product> Products {get;set;}

will result in

class myclass {
public IList<product> Products {get;set;}
}</product> --Note the self closing </product> here

does anyone know where does BE perform this ?

Feb 7, 2014 at 11:23 PM
Edited Feb 7, 2014 at 11:43 PM
2.9 uses this editor and doesn't do any extra processing on its own:

Also, WLW does same thing, so editor is not to blame. You need to use "&lt" and "&gt" for straight "pre" tag or use extension that does this conversion for you. For example, WLW has several code formatters that work this way.
Feb 8, 2014 at 12:13 AM
BE still use Syntax Highlighter though, it's actually loads all brushes using shActivator.js. That's being said; I looked into this briefly and I think the root cause of this is angular sanitize call.

I removed the ngSanitize from var app = angular.module("blogEditor", ['ngRoute', 'ngAnimate', 'ngSanitize']); but that didn't help