-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.0] Blade templates always interprets @parent on the page - even inside escaped variable output #7888
Comments
p.s. I am aware you can do But it is not ok when user inputted data has the ability to change the blade template system - even when fully escaped. |
Is it the same for every blade tags? |
Not from my testing - no. From looking at the Blade code - it seems that the way |
Closing due to inactivity. |
I have arrived with the same problem, In my case I needs to use @parent very usually, I need some effective solution for this. |
I provided a workaround solution here: http://stackoverflow.com/a/28902882/633056 But this really needs fixing. I've never been convinced that inactivity is a good reason to closed an issue -- the issue is still open in the eys of the people who are experiencing this. |
For now, since we don't use the @parent feature of blade, we've overwritten the method and commented the str_replace line. |
Current version of Laravel 5:
example.blade.php
If you call this template like this:
Then you would expect to see
Instead you see
What is the problem is that you cannot stop the blade template system from interpreting
@parent
even in escaped output.This is also occuring in Laravel 4 - as described here (which is what lead me to investigate the issue in the first place): http://stackoverflow.com/q/28876911/1317935
The text was updated successfully, but these errors were encountered: