diff options
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 2 | ||||
-rw-r--r-- | lib/redmine/utils/shell.rb | 4 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/textile/formatter.rb | 2 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/textile/redcloth3.rb | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 9fdc2a307..4d694a6ab 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -364,7 +364,7 @@ module Redmine end def normalize_cvs_path(path) - normalize_path(path.gsub(/Attic\//,'')) + normalize_path(path.gsub("Attic/",'')) end def normalize_path(path) diff --git a/lib/redmine/utils/shell.rb b/lib/redmine/utils/shell.rb index 1de5283d1..f3b769f57 100644 --- a/lib/redmine/utils/shell.rb +++ b/lib/redmine/utils/shell.rb @@ -24,9 +24,9 @@ module Redmine def shell_quote(str) if Redmine::Platform.mswin? - '"' + str.gsub(/"/, '\\"') + '"' + '"' + str.gsub('"', '\\"') + '"' else - "'" + str.gsub(/'/, "'\"'\"'") + "'" + "'" + str.gsub("'", "'\"'\"'") + "'" end end diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb index 53c04341d..f29b3960e 100644 --- a/lib/redmine/wiki_formatting/textile/formatter.rb +++ b/lib/redmine/wiki_formatting/textile/formatter.rb @@ -115,7 +115,7 @@ module Redmine # original language for extension development langattr = " data-language=\"#{CGI.escapeHTML language}\"" if language.present? if Redmine::SyntaxHighlighting.language_supported?(language) - text.gsub!(/x%x%/, '&') + text.gsub!("x%x%", '&') content = "<code class=\"#{CGI.escapeHTML language} syntaxhl\"#{langattr}>" + Redmine::SyntaxHighlighting.highlight_by_language(text, language) else diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index 406fca08d..d77a0664b 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -313,7 +313,7 @@ class RedCloth3 < String retrieve text text.gsub!( /<\/?notextile>/, '' ) - text.gsub!( /x%x%/, '&' ) + text.gsub!( "x%x%", '&' ) clean_html text if filter_html text.strip! text @@ -1016,9 +1016,9 @@ class RedCloth3 < String def clean_white_space( text ) # normalize line breaks - text.gsub!( /\r\n/, "\n" ) + text.gsub!( "\r\n", "\n" ) text.tr!( "\r", "\n" ) - text.gsub!( /\t/, ' ' ) + text.gsub!( "\t", ' ' ) text.gsub!( /^ +$/, '' ) text.gsub!( /\n{3,}/, "\n\n" ) text.gsub!( /"$/, "\" " ) @@ -1184,7 +1184,7 @@ class RedCloth3 < String } def clean_html( text, tags = BASIC_TAGS ) - text.gsub!( /<!\[CDATA\[/, '' ) + text.gsub!( "<![CDATA[", '' ) text.gsub!( /<(\/*)(\w+)([^>]*)>/ ) do raw = $~ tag = raw[2].downcase |