-
Notifications
You must be signed in to change notification settings - Fork 289
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
Escaping a string to pass to flash() causes a PHP warning #231
Comments
Interesting. The error you're getting is referring to the I don't see where you are calling |
Indeed I don't call it, and yes...this is really interesting. |
Ah ha! I've fixed this locally on a branch of mine by escaping the You must be calling |
I'm sorry but I really don't use that method. Anyway, if you want you can create a release with this fix so that I can update my vendor folder, and then I'll inform you of the result. |
Hmm, the problem is that escaping the I won't be able to release this without a more clever fix. |
I see. Do whatever is best for the project, I've solved this issue as shown below: $service->flash('my message' . $service->escape(strip_tags(urldecode($request->data))), 'info'); |
There you go! Now if only we could figure out how you're ever even reaching line 239 in the |
@Rican7 I could be wrong, but isn't the flash() method calling the markdown() method behind the scenes? |
@nbish11 ohhhh yea. :P |
I'm using Klein 2.0.2 and in a function I have:
While trying the robustness of the code, I set
$request->data
to<script>
which is converted into%3Cscript%3E
and this is the message I receive:I've noted that even without calling
$service->escape()
the issue is still there because the parameter has already been escaped.Hope this helps.
The text was updated successfully, but these errors were encountered: