More progress on S5.
Forgot to add gremlin zapping in app/views/wiki/edit.rhtml.
This commit is contained in:
parent
8359047fd5
commit
02c6ed2fa0
7 changed files with 83 additions and 34 deletions
|
@ -2,6 +2,7 @@ require 'fileutils'
|
|||
require 'redcloth_for_tex'
|
||||
require 'parsedate'
|
||||
require 'zip/zip'
|
||||
require 'sanitize'
|
||||
|
||||
class WikiController < ApplicationController
|
||||
|
||||
|
@ -11,6 +12,8 @@ class WikiController < ApplicationController
|
|||
|
||||
layout 'default', :except => [:rss_feed, :rss_with_content, :rss_with_headlines, :tex, :pdf, :s5, :export_tex, :export_html]
|
||||
|
||||
include Sanitize
|
||||
|
||||
def index
|
||||
if @web_name
|
||||
redirect_home
|
||||
|
@ -287,7 +290,9 @@ class WikiController < ApplicationController
|
|||
|
||||
def s5
|
||||
if @web.markup == :markdownMML or @web.markup == :markdown
|
||||
@s5_content = Maruku.new(@page.content).to_s5
|
||||
# @s5_content = sanitize_html(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"), {:raw => true}).to_s5)
|
||||
@s5_content = sanitize_html(Maruku.new(@page.content.delete("\r\x01-\x08\x0B\x0C\x0E-\x1F"),
|
||||
{:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}'], :content_only => true}).to_s5)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue