d989d62c10
refs #9589 * updated encode helper to use newer code standards * updated facebook_url helper to use newer code standards * updated foreach helper to use newer code standards
13 lines
268 B
JavaScript
13 lines
268 B
JavaScript
// # Encode Helper
|
|
//
|
|
// Usage: `{{encode uri}}`
|
|
//
|
|
// Returns URI encoded string
|
|
|
|
const {SafeString} = require('./proxy');
|
|
|
|
module.exports = function encode(string, options) {
|
|
const uri = string || options;
|
|
return new SafeString(encodeURIComponent(uri));
|
|
};
|