From 7ea8e0a5e829a282dfc4f21595d76146fd6b5334 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 8 Apr 2016 14:02:52 +0100 Subject: Filtered hints; do not accept split characters. There is no point accepting characters which are used for splitting the link text in the query string, since such characters cannot appear in link text words. --- content_scripts/link_hints.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 13f28f06..3cbda59f 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -464,7 +464,8 @@ class FilterHints # hints). if 0 <= @linkHintNumbers.indexOf keyChar @hintKeystrokeQueue.push keyChar - else + # We only accept and characters which are not used for splitting (e.g. "a", "b", etc., but not "-"). + else if keyChar == " " or not @splitRegexp.test keyChar # Since we might renumber the hints, we should reset the current hintKeyStrokeQueue. @hintKeystrokeQueue = [] @linkTextKeystrokeQueue.push keyChar -- cgit v1.2.3