From ed05880653087eaff880de8921aa9f2c95145319 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 8 Oct 2016 16:22:37 +0800 Subject: [PATCH] =?UTF-8?q?https=E7=9A=84=E9=93=BE=E6=8E=A5=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/syllabuses/show.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/syllabuses/show.html.erb b/app/views/syllabuses/show.html.erb index d3398234a..b6c32f125 100644 --- a/app/views/syllabuses/show.html.erb +++ b/app/views/syllabuses/show.html.erb @@ -5,6 +5,14 @@ $(function() { sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>"); showNormalImage('syllabus_description_<%= @syllabus.id %>'); + $("#syllabus_description_<%= @syllabus.id%> p,#syllabus_description_<%= @syllabus.id%> span,#syllabus_description_<%= @syllabus.id%> em").each(function(){ + var postContent = $(this).html(); + postContent = postContent.replace(/ /g," "); + postContent= postContent.replace(/ {2}/g,"  "); + postContent=postContent.replace(/   /g,"   "); + postContent=postContent.replace(/  /g,"   "); + $(this).html(postContent); + }); autoUrl('syllabus_description_<%= @syllabus.id %>'); });