diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index acd68815d..ca95cdb4e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -109,7 +109,7 @@ class UsersController < ApplicationController end def custom_style - @css = CustomCss.parse(CurrentUser.user.custom_style) + @css = CurrentUser.user.custom_style expires_in 10.years end diff --git a/app/logical/custom_css.rb b/app/logical/custom_css.rb deleted file mode 100644 index 0f3629095..000000000 --- a/app/logical/custom_css.rb +++ /dev/null @@ -1,11 +0,0 @@ -module CustomCss - def self.parse(css) - css.to_s.split(/\r\n|\r|\n/).map do |line| - if line =~ /\A@import/ - line - else - line.gsub(/([^[:space:]])[[:space:]]*(?:!important)?[[:space:]]*(;|})/, "\\1 !important\\2") - end - end.join("\n") - end -end