Closed JustBlackBird closed 10 years ago
@fzerorubigd could you please review it? On Feb 3, 2014 12:34 PM, "Dmitriy S. Simushev" notifications@github.com wrote:
Line helpers can return a result wrapped into Handlebars\safeString class to prevent auto escaping.
Example of usage:
$engine = new \Handlebars\Handlebars(); $engine->addHelper('copyrigth', function() { return new \Handlebars\SafeString('Copyright 2014 Example dot com');});
You can merge this Pull Request by running
git pull https://github.com/Mibew/handlebars.php safe_string
Or view, comment on, or merge it at:
https://github.com/XaminProject/handlebars.php/pull/45 Commit Summary
- Add \Handlebars\SafeString class
File Changes
- A src/Handlebars/BaseString.phphttps://github.com/XaminProject/handlebars.php/pull/45/files#diff-0(78)
- A src/Handlebars/SafeString.phphttps://github.com/XaminProject/handlebars.php/pull/45/files#diff-1(33)
- M src/Handlebars/String.phphttps://github.com/XaminProject/handlebars.php/pull/45/files#diff-2(49)
- M src/Handlebars/Template.phphttps://github.com/XaminProject/handlebars.php/pull/45/files#diff-3(2)
- M tests/Xamin/HandlebarsTest.phphttps://github.com/XaminProject/handlebars.php/pull/45/files#diff-4(5)
Patch Links:
- https://github.com/XaminProject/handlebars.php/pull/45.patch
- https://github.com/XaminProject/handlebars.php/pull/45.diff
— Reply to this email directly or view it on GitHubhttps://github.com/XaminProject/handlebars.php/pull/45 .
@everplays This is handlebars.js behavior and I think we can have it here. @JustBlackBird thanks.
Line helpers can return a result wrapped into
Handlebars\safeString
class to prevent auto escaping.Example of usage: