API Docs for: 0.25.0
Show:

File: addon/helpers/fix-special-char.js

  1. import Ember from 'ember';
  2. import fixSpecialChar from '../utils/fix-special-char';
  3.  
  4. /**
  5. Apply the `fix-special-char` utility function to clean up malformed text sent from the server.
  6.  
  7. Usage example:
  8. ```handlebars
  9. This is text we want to fix: {{fix-special-char 'Now & then'}}
  10. ```
  11.  
  12. @class fix-special-char-helper
  13. @uses fix-special-char
  14. */
  15. export function fixSpecialCharHelper(params/*, hash*/) {
  16. return params ? fixSpecialChar(params[0]) : params;
  17. }
  18.  
  19. export default Ember.Helper.helper(fixSpecialCharHelper);
  20.