From 092acd2b8509a84b14c55fefd204f1ccf1cc9513 Mon Sep 17 00:00:00 2001 From: Ant Grimmitt Date: Tue, 24 Nov 2015 13:55:33 +0000 Subject: [PATCH] added pound sign to the regex --- lib/truncate_html/html_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/truncate_html/html_string.rb b/lib/truncate_html/html_string.rb index 76d82e9..71d3b09 100644 --- a/lib/truncate_html/html_string.rb +++ b/lib/truncate_html/html_string.rb @@ -3,7 +3,7 @@ module TruncateHtml class HtmlString < String UNPAIRED_TAGS = %w(br hr img).freeze - REGEX = /(?:.*<\/script>)+|<\/?[^>]+>|[[[:alpha:]][0-9]\|`~!@#\$%^&*\(\)\-_\+=\[\]{}:;'²³§",\.\/?]+|\s+|[[:punct:]]/.freeze + REGEX = /(?:.*<\/script>)+|<\/?[^>]+>|[[[:alpha:]][0-9]\|`~!@#\$%^&£*\(\)\-_\+=\[\]{}:;'²³§",\.\/?]+|\s+|[[:punct:]]/.freeze def initialize(original_html) super(original_html)