Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dolgarev/meteor-escapehtml
Expose internal method Blaze._escape
https://github.com/dolgarev/meteor-escapehtml
meteor meteor-package meteorjs
Last synced: 9 days ago
JSON representation
Expose internal method Blaze._escape
- Host: GitHub
- URL: https://github.com/dolgarev/meteor-escapehtml
- Owner: dolgarev
- Created: 2017-04-29T18:04:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-11T11:02:22.000Z (about 7 years ago)
- Last Synced: 2024-11-14T22:31:29.059Z (2 months ago)
- Topics: meteor, meteor-package, meteorjs
- Language: JavaScript
- Homepage: https://atmospherejs.com/liberation/escapehtml
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# meteor-escapeHtml
Expose internal method `Blaze._escape` as `Blaze.escapeHtml`
```js
Blaze.escapeHtml('alert(123)') // => result is "<script>alert(123)</script>"
Blaze.escapeHtml(1) // => result is error "Uncaught TypeError: x.replace is not a function"
Blaze.escapeHtml(1, 'n/a') // => result is "n/a"Blaze.escapeHtmlString('alert(123)') // => result is "<script>alert(123)</script>"
Blaze.escapeHtmlString(1) // => result is "1"
Blaze.escapeHtmlString(1, 'n/a') // => result is "<b>n/a</b>"
```