Bulk reqs: add line breaks

Scripts longer than 1 line are completely unreadable without line breaks
This commit is contained in:
Toks
2014-07-31 21:19:43 -04:00
parent 2b3909496a
commit 76f31bd6b5
2 changed files with 5 additions and 1 deletions

View File

@@ -1,2 +1,6 @@
module BulkUpdateRequestsHelper
def script_with_line_breaks(script)
escaped_script = script.gsub(/&/, "&amp;").gsub(/</, "&lt;").gsub(/>/, "&gt;")
escaped_script.gsub(/\n/m, "<br>").html_safe
end
end