Skip to content

Instantly share code, notes, and snippets.

@Srinithi-23
Created February 9, 2018 10:54
Show Gist options
  • Save Srinithi-23/b4bfac9d74e82dbf9a381e65a55ce94b to your computer and use it in GitHub Desktop.
Save Srinithi-23/b4bfac9d74e82dbf9a381e65a55ce94b to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
Img_tag: Ember.String.htmlSafe('<img src="" onerror=alert();>'),
Img_tag_with_tag:'<b>'+Ember.String.htmlSafe('<img src="" onerror=alert();>')+'</b>'
});
<h1>With html safe string</h1>
<br>
<br>
<h2>Double braces</h2>
{{Img_tag}}
<br>
<br>
<br>
<br>
<h2>Triple braces</h2>
{{{Img_tag}}}
<br>
<br>
<hr>
<h1>With html safe string with tag</h1>
<br>
<h2>Double braces</h2>
{{Img_tag_with_tag}}
<br>
<br>
<br>
<br>
<h2>Triple braces</h2>
{{{Img_tag_with_tag}}}
<br>
<br>
{
"version": "0.13.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment