This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 61271403 avoid use of chars as a field as it looks like a method call
61271403 is described below

commit 6127140356016335df7c87eee2e25141858ffcda
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed May 18 05:31:02 2022 -0700

    avoid use of chars as a field as it looks like a method call
---
 www/board/agenda/views/utils.js.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/utils.js.rb 
b/www/board/agenda/views/utils.js.rb
index 70ffe36b..c137d923 100644
--- a/www/board/agenda/views/utils.js.rb
+++ b/www/board/agenda/views/utils.js.rb
@@ -7,10 +7,10 @@ Server = {directors: []}
 
 # Escape HTML characters so that raw text can be safely inserted as HTML
 def htmlEscape(string)
-  return string.gsub(htmlEscape.chars) {|c| htmlEscape.replacement[c]}
+  return string.gsub(htmlEscape.special) {|c| htmlEscape.replacement[c]}
 end
 
-htmlEscape.chars = Regexp.new('[&<>]', 'g')
+htmlEscape.special = Regexp.new('[&<>]', 'g')
 htmlEscape.replacement = {'&' => '&amp;', '<' => '&lt;', '>' => '&gt;'}
 
 # escape a string so that it can be used as a regular expression

Reply via email to