1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00
documize/gui/app
Maximilian Bosch 444b4fd1f7
Render HTML in Markdown during previews as well
When having e.g. a markdown-based section in a document where you
reference another document, a HTML-link is generated. However when
previewing changes, the raw HTML is shown.

With setting `html: true` in the configuration for `markdownit`[1],
HTML is detected and properly parsed (Also markup tags such as `<h1>`
are rendered properly just like when using `blackfriday` to request a rendered
section).

Regarding probably harmful side-effects: setting e.g. `<style>* { display:
none !important; }</style>` causes a white page with `markdownit` as
well as with `blackfriday`. `<script>` tags aren't affected since
`handlebars` mostly breaks with `<script>` tags within variables that
are substituted using `{{{var}}}` into the DOM[3].

Please note that I didn't commit the modifications in `embed/bindata.go`
as it seemed to me after looking at the history that those updates are
only done when preparing a release.

[1] 1ad3aec204/lib/presets/default.js (L6-L9)
[2] https://github.com/documize/blackfriday/blob/master/markdown.go#L105-L146
[3] https://github.com/wycats/handlebars.js/issues/531
2019-08-01 21:02:35 +02:00
..
adapters moved emberjs to gui folder 2017-07-19 14:48:33 +01:00
authenticators PRovide LDAP sync and authentication 2018-09-04 17:19:26 +01:00
components Render HTML in Markdown during previews as well 2019-08-01 21:02:35 +02:00
constants Add “Reply” to constants 2019-06-10 15:47:13 +01:00
controllers moved emberjs to gui folder 2017-07-19 14:48:33 +01:00
helpers Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
initializers Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
mixins Support dual login via LDAP and forms authentication 2019-05-13 16:14:11 +01:00
models Provide per section attachments 2019-04-18 13:31:48 +01:00
pods Install helps docs as part of onboarding process 2019-06-24 17:01:56 +01:00
routes Remove double screen blink after logout 2019-05-14 14:52:36 +01:00
serializers Use default Ember object ID for permissions model 2018-04-26 12:03:23 +01:00
services Install helps docs as part of onboarding process 2019-06-24 17:01:56 +01:00
styles Replace UPLOAD with + for attachments action 2019-06-25 16:53:43 +01:00
templates Prevent space user invitation for non-Documize auth providers 2019-06-25 17:05:25 +01:00
transforms moved emberjs to gui folder 2017-07-19 14:48:33 +01:00
utils Upgrade UI framework to Ember v3.10.0 2019-05-16 12:49:27 +01:00
app.js upgraded Ember and integrated Bootstrap 4 2017-11-16 13:28:05 +00:00
index.html Accept activation key during setup process 2019-06-19 12:46:05 +01:00
resolver.js moved emberjs to gui folder 2017-07-19 14:48:33 +01:00
router.js Allow doc/section/files links to open in tabs 2019-04-10 20:03:34 +01:00