Skip to content

[BUG] Letters "OL" are converted to "UL" #145

Description

@Samyssmile

quill-table-better converts/replace "ol" to "ul"

Image Image

How to reproduce

  1. Create a table
  2. Create a list item and type any word in that contains "ol". Like bolg, tolg, rolg.
  3. Check the html change content of quill in the browsers dev tools, all ol magicly replaced by ul.

I think this happend because of html tag <ol> . Its happen only inside a cell and only with bullet list item. I created also a new clean Angular App with quill and quill-table-better and can reproduce it.

Root Cause

table.ts

html() {
    const reg = /<(ol)[^>]*><li[^>]* data-list="bullet">(?:.*?)<\/li><\/(ol)>/gi;
    return this.domNode.outerHTML.replace(reg, (
      match: string, $1: string, $2: string
    ) => {
      return match.replace($1, 'ul').replace($2, 'ul');
    });
  }

Solution

I created a PR to solve this. A quick release with the hotfix would be incredibly useful for us.

Thank you and great plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions