Skip to content

HTML not interpreted #836

Closed
Closed

Description

@Didayolo

HTML pages are not well rendered by Codabech. Only markdown works.

Related issues:

Example:

Capture d’écran 2023-05-04 à 18 16 56

Activity

  1. Didayolo commented on May 12, 2023

    @Didayolo
    MemberAuthor

    I confirm that the HTML inside .md files is not interpreted either.

  2. Didayolo commented on May 12, 2023

    @Didayolo
    MemberAuthor

    We have this in utils.js:

    function sanitize_HTML(input, extra_settings) {
        extra_settings = extra_settings || {}
        input = input || ''
        extra_settings.FORBID_TAGS = _.union(extra_settings.FORBID_TAGS, ['style'])
        extra_settings.FORBID_ATTR = _.union(extra_settings.FORBID_ATTR, ['style'])
    
        return DOMPurify.sanitize(input, extra_settings)
    }
    
    function render_markdown(input, extra_settings) {
        extra_settings = extra_settings || {}
        input = input || ''
        if(EasyMDE.prototype.options === undefined) {
            EasyMDE.prototype.options = {
                renderingConfig: easyMDE_rendering_config
            }
        }
        return sanitize_HTML(EasyMDE.prototype.markdown(input), extra_settings)
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions