Commit 2a4f791b authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

GadgetGrep: Escape user input

parent 92254de8
......@@ -21,6 +21,7 @@
function displayURLList(gadget, event) {
var url_list = [],
grep_pattern = gadget.props.element.querySelector(".search-pattern").value;
grep_pattern = grep_pattern.replace(new RegExp(/[-\/\\^$*+?.()|[\]{}]/g), '\\$&');
return new RSVP.Queue()
.push(function () {
return gadget.crib_sw_allDocs();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment