2014-10-10 18:54:07 +04:00
|
|
|
// # Title Helper
|
|
|
|
// Usage: `{{title}}`
|
|
|
|
//
|
|
|
|
// Overrides the standard behaviour of `{[title}}` to ensure the content is correctly escaped
|
|
|
|
|
2017-04-04 19:07:35 +03:00
|
|
|
var proxy = require('./proxy'),
|
|
|
|
SafeString = proxy.SafeString,
|
|
|
|
escapeExpression = proxy.escapeExpression;
|
2014-10-10 18:54:07 +04:00
|
|
|
|
2017-04-04 19:07:35 +03:00
|
|
|
module.exports = function title() {
|
|
|
|
return new SafeString(escapeExpression(this.title || ''));
|
2014-10-10 18:54:07 +04:00
|
|
|
};
|