Skip to content
Browse files

Escape regexp metacharacter

  • Loading branch information...
1 parent a4072f2 commit dd0d00e532d55caac51b996502f03060c4f683f7 h-morita committed with rudi Jun 4, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 simplenote.el
View
2 simplenote.el
@@ -307,7 +307,7 @@ via the usual `-*- mode: text -*-' header line."
"Text after the first non-empty line of a note, to fill in the list display."
(let* ((headline (simplenote-note-headline text))
(text (replace-regexp-in-string "\n" " " text))
- (begin (when headline (string-match headline text))))
+ (begin (when headline (string-match (regexp-quote headline) text))))
(when begin (substring text (match-end 0)
(min (length text)
(+ (match-end 0) (- 78 (length headline))))))))

0 comments on commit dd0d00e

Please sign in to comment.
Something went wrong with that request. Please try again.