Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View sanitize #42

Closed
AntonShevchuk opened this issue Feb 21, 2013 · 3 comments
Closed

View sanitize #42

AntonShevchuk opened this issue Feb 21, 2013 · 3 comments
Assignees
Milestone

Comments

@AntonShevchuk
Copy link
Member

До идеала View не хватает удобного инструмента для "обезвреживания" данных в шаблоне. Возможные пути решения - создания "обёртки"/"презерватива", вроде бы тот же объект, но нет...:

<?php
$foo->bar = "<script>alert(123)</script>";
$foo = new Sanitize($foo);
echo $foo->bar; // &lt;script&gt;alert(123)&lt;/script&gt;
@AntonShevchuk
Copy link
Member Author

@AntonShevchuk
Copy link
Member Author

Я не знаю как красиво, удобно и не напряжно по памяти организовать данный функционал, пока добавил функцию экранирования - esc($value)

@ghost ghost assigned AntonShevchuk Oct 15, 2013
@AntonShevchuk AntonShevchuk modified the milestones: 1.1.0, 1.0.0 May 12, 2015
@AntonShevchuk AntonShevchuk modified the milestones: 1.1.0, 2.1.0 Jan 29, 2016
@AntonShevchuk AntonShevchuk modified the milestones: 2.1.0, 7.0.0 Jul 13, 2016
@AntonShevchuk
Copy link
Member Author

Оставляем как есть

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant