Hi Devarakonda,

WARNING: the following technique might run external code inside your app, 
and thus create a security risk, use on your own responsibility!

you can use the browser to create proper html out of an sting, however, 
this means that it gets fed into a dom element. This might lead to the 
above security risk.
do something like this: (code typed into the browser, not tested!)

function createHTML(rawHTML){
 var el = document.createElement('div')
 el.innerHTML = rawHTML
 // you can do 2 things now, return the element, and insert as it is,
 // or, read out the HTML and pass it to $sce. this might be a little safer.
 return el.innerHTML; //This HTML is prarsed by the browser, so most syntax 
error should be gone by now.
}

Does this help you somewhat?

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to