Skip to content
Browse files

Deprecate "html" handlebars helper in favor of triple-stash.

  • Loading branch information...
1 parent e960b36 commit 63d52cdd771b36c03dd2788e90c066d2c133ac37 @JohnAlbin JohnAlbin committed
Showing with 6 additions and 3 deletions.
  1. +3 −0 bin/kss-node
  2. +3 −3 lib/template/index.html
View
3 bin/kss-node
@@ -461,6 +461,9 @@ handlebars.registerHelper('modifierMarkup', function(modifier) {
* @param {String} arg The unescaped HTML
*/
handlebars.registerHelper('html', function(arg) {
+ // Warn the user that html is deprecated.
+ console.log('{{html expression}} is deprecated; use HandleBars’ triple-stash instead: {{{expression}}}.');
+
return new handlebars.SafeString(arg || '');
});
View
6 lib/template/index.html
@@ -33,7 +33,7 @@
<div role="main" id="kss-main">
<article id="kss-content">
{{#if overview}}
- {{html overview}}
+ {{{overview}}}
{{else}}
{{!
@@ -52,7 +52,7 @@
<h1 class="kss-title"><span class="kss-ref">{{ reference }}{{#whenDepth 1}}.0{{/whenDepth}}</span> - {{ header }}</h1>
{{#if description}}
- <div class="kss-box">{{html description}}</div>
+ <div class="kss-box">{{{description}}}</div>
{{/if}}
{{#if markup}}
@@ -66,7 +66,7 @@ <h1 class="kss-title"><span class="kss-ref">{{ reference }}{{#whenDepth 1}}.0{{/
</tr>
{{#eachModifier}}
<tr class="kss-mod-desc-group">
- <td class="kss-mod-desc">{{html description}}</td>
+ <td class="kss-mod-desc">{{{description}}}</td>
<td class="kss-mod-name"><p>{{name}}</p></td>
</tr>
<tr class="kss-mod-example">

0 comments on commit 63d52cd

Please sign in to comment.
Something went wrong with that request. Please try again.