Skip to content

Commit

Permalink
Morph escaping is now handled by the parseTextAsHTML property
Browse files Browse the repository at this point in the history
  • Loading branch information
mmun committed Feb 11, 2015
1 parent 6fcb151 commit 87251db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/ember-routing-htmlbars/lib/helpers/link-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function linkToHelper(params, hash, options, env) {

if (!options.template) {
var linkTitle = params.shift();
var shouldEscape = options.morph.escaped;
var parseTextAsHTML = options.morph.parseTextAsHTML;

if (isStream(linkTitle)) {
hash.linkTitle = { stream: linkTitle };
Expand All @@ -312,10 +312,10 @@ function linkToHelper(params, hash, options, env) {
isHTMLBars: true,
render: function(view, env) {
var value = read(linkTitle) || "";
if (shouldEscape) {
return env.dom.createTextNode(value);
} else {
if (parseTextAsHTML) {
return value;
} else {
return env.dom.createTextNode(value);
}
}
};
Expand Down

0 comments on commit 87251db

Please sign in to comment.