mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Integrate new engine, correct old specs
corrects edge cases with - full quotes - [url] with nested tags - engine overrides - onebox applying to non http srcs
This commit is contained in:
parent
ee470b5317
commit
f1b38ba4fb
10 changed files with 341 additions and 780 deletions
|
@ -175,12 +175,14 @@ module PrettyText
|
|||
|
||||
buffer << "__textOptions = __buildOptions(__optInput);\n"
|
||||
|
||||
# Be careful disabling sanitization. We allow for custom emails
|
||||
if opts[:sanitize] == false
|
||||
buffer << ('__textOptions.sanitize = false;')
|
||||
end
|
||||
|
||||
buffer << ("__pt = new __PrettyText(__textOptions);")
|
||||
|
||||
# Be careful disabling sanitization. We allow for custom emails
|
||||
if opts[:sanitize] == false
|
||||
buffer << ('__pt.disableSanitizer();')
|
||||
end
|
||||
|
||||
opts = context.eval(buffer)
|
||||
|
||||
DiscourseEvent.trigger(:markdown_context, context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue