fix remove <br> bug

This commit is contained in:
chiu 2020-11-19 15:12:34 +08:00
parent f537be86ea
commit b5f80a0646
1 changed files with 2 additions and 2 deletions

View File

@ -7,10 +7,10 @@ class BreadcrumbWidgetsController < ApplicationController
crumbs.each do |crumb|
if crumb == ""
p = Page.root
data << {"page_name" => p.name.gsub('<br>',''), "url" => "/?locale=#{locale.to_s}"}
data << {"page_name" => p.name.gsub(/<br>|<BR>/,''), "url" => "/?locale=#{locale.to_s}"}
else
p = Page.where(:page_id => crumb).first
data << {"page_name" => p.name.gsub('<br>',''), "url" => "/#{locale.to_s}" + p.url}
data << {"page_name" => p.name.gsub(/<br>|<BR>/,''), "url" => "/#{locale.to_s}" + p.url}
end
end
{