Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • Kotahi Kotahi
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 302
    • Issues 302
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 64
    • Merge requests 64
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • kotahikotahi
  • KotahiKotahi
  • Merge requests
  • !732

fix(*): fixes malformed HTML coming from xsweet

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Dan Visel requested to merge xsweet-problematic-symptom-fix into main Jan 23, 2023
  • Overview 3
  • Commits 2
  • Pipelines 2
  • Changes 1

This is to deal with what's described in the comments of #1023 (closed). Sometimes XSweet is turning math, which should look something like this:

<p><math-display>...math...</math-display></p>

to this:

<h4><h4><math-display>...math...</math-display></h4></h4>

If that's not invalid HTML, it's not quite sensical, and it breaks further parsing – so the math tags get thrown away. What this fix does is to replace <h4><h4> and </h4></h4> with <p> and </p> respectively; with this in place, parsing works normally.

However! This is basically plastering over a problem that's coming from XSweet. I don't know why we're getting the nested <h4>s; I don't know if they're always <h4>s. If there's a way to fix this problem on that end, that would be a greatly superior solution.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: xsweet-problematic-symptom-fix