Re:ƒu.js - The Functional DOM traversing library.
by jessedhillon on Sunday January 30, 2011 @01:17PM
(#2158645)
A better way to do that would be to split() it first on '=' then, split() the left side on '.' and iterate the results. You don't want to evaluate just anything anyone puts in that second argument.
[ Parent
| on HN ]
Re:ƒu.js - The Functional DOM traversing library.
by tsenart on Sunday January 30, 2011 @01:33PM
(#2158700)
Well... Actually I do.
Re:ƒu.js - The Functional DOM traversing library.
by jessedhillon on Sunday January 30, 2011 @11:02PM
(#2160224)
If you want to eval anything anyone passes you with no consideration for what it could be, then I have to agree with OP that you must not be aware of the pitfalls of using eval.
Consider that the "black" portion of that argument actually comes from user input and that you were passed instead:
black"); alert('This framework is awesome!
Try eval'ing that.