Skip to content

Commit

Permalink
Merge pull request #15901 from thoov/safe-string
Browse files Browse the repository at this point in the history
[CLEANUP] Remove Ember.Handlebars.SafeString
  • Loading branch information
rwjblue authored Dec 1, 2017
2 parents 9e1e171 + 997c113 commit 514b7fb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
3 changes: 1 addition & 2 deletions packages/ember-glimmer/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ export {
SafeString,
escapeExpression,
htmlSafe,
isHTMLSafe,
getSafeString as _getSafeString,
isHTMLSafe
} from './utils/string';
export {
Renderer,
Expand Down
14 changes: 0 additions & 14 deletions packages/ember-glimmer/lib/utils/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ export class SafeString {
}
}

export function getSafeString() {
deprecate(
'Ember.Handlebars.SafeString is deprecated in favor of Ember.String.htmlSafe',
false,
{
id: 'ember-htmlbars.ember-handlebars-safestring',
until: '3.0.0',
url: 'https://emberjs.com/deprecations/v2.x#toc_use-ember-string-htmlsafe-over-ember-handlebars-safestring',
},
);

return SafeString;
}

const escape = {
'&': '&',
'<': '&lt;',
Expand Down
7 changes: 1 addition & 6 deletions packages/ember/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ import {
escapeExpression,
isHTMLSafe,
getTemplates,
setTemplates,
_getSafeString
setTemplates
} from 'ember-glimmer';

Ember.Component = Component;
Expand All @@ -455,10 +454,6 @@ let EmberHandlebars = Ember.Handlebars = Ember.Handlebars || {};
let EmberHTMLBars = Ember.HTMLBars = Ember.HTMLBars || {};
let EmberHandleBarsUtils = EmberHandlebars.Utils = EmberHandlebars.Utils || {};

Object.defineProperty(EmberHandlebars, 'SafeString', {
get: _getSafeString
});

EmberHTMLBars.template = EmberHandlebars.template = template;
EmberHandleBarsUtils.escapeExpression = escapeExpression;
EmberString.htmlSafe = htmlSafe;
Expand Down
1 change: 0 additions & 1 deletion packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ QUnit.module('ember reexports');
['TextField', 'ember-glimmer', 'TextField'],
['TEMPLATES', 'ember-glimmer', { get: 'getTemplates', set: 'setTemplates' }],
['Handlebars.template', 'ember-glimmer', 'template'],
['Handlebars.SafeString', 'ember-glimmer', { get: '_getSafeString' }],
['Handlebars.Utils.escapeExpression', 'ember-glimmer', 'escapeExpression'],
['String.htmlSafe', 'ember-glimmer', 'htmlSafe'],

Expand Down

0 comments on commit 514b7fb

Please sign in to comment.