Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2009 at 16:07 UTC
Updated:
13 Aug 2010 at 20:47 UTC
Jump to comment: Most recent file
Comments
Comment #1
Crell commentedWon't this still run check_plain() either way, since it's after the if() statement?
Comment #2
merlinofchaos commentedSince most fields override render() I don't think this is the right solution.
I think we need to fix this in the make link portion, where we run the link through filter_xss_admin and set 'html' => true on the l() call.
Comment #3
agentrickard@Crell
No. You're missing the return statement inside the IF.
@merlin
I'll see what I can do, but my first tests didn't seem to help there.
Comment #4
agentrickardBetter title. Better patch.
We decode entities before we strip_tags. This allows strings like "Foo & Bar" to be passed to l() without having been run through check_plain() alterations.
Comment #5
kenorb commentedSimilar issue: #483036: Slash replaced in Link path by %252F, but it's probably something else.
Comment #6
agentrickardThat other issue is unrelated.
Updated patch for 6.x.2.6.
Comment #7
deviantintegral commentedDoes this mean that the check_plain calls in views_handler_field_node->render and render_link can be safely removed? The patch in #6 doesn't fix the original issue of double-encoding the title attribute for me. If that's the solution, I can go through all of the render methods as needed.
Comment #8
merlinofchaos commented#7: No, that's something else, and cannot be safely removed. This only affects link paths which are Special.
BTW this one fell through the cracks due to being marked 'needs work'. =)
Comment #10
kesmeby commentedI'm running the latest Dev version of Views (6.x-2.x-dev) and while the above patch is present in this build I'm still running into the problem of it stripping out ampersands from my URLs when I'm using "Output this field as a link"
I'm trying to link to another view and pass a variable. Does views block this as a security risk? While it strips out "&" and "=" it allows #, $, % and * right through.
I apologize if this is the wrong thread to ask this question.
Comment #11
kesmeby commentedI forgot to reset the status of the issue when I posted earlier.
Comment #12
merlinofchaos commentedThe stripping out of ampersands is not due to the check_plain stuff from above, but because Drupal's url() function expends the query string to be provide separately. That would be a completely separate issue.
Comment #13
Ogredude commentedOK, so what's the solution to make the url() function quit escaping & and = ?
Comment #14
asb commentedsub
Comment #15
lucascaro commentedsubscribing...