Skip to content

Not processing text containing html tags properly #16932

@cfx1

Description

@cfx1

Adding an item containing html tags to the list, such as the text: Text escaping: <xyz>tag</xyz> will yield incorrect suggestions.

Setup

<input id="myinput" />
<script>
    var input = document.getElementById("myinput");
    new Awesomplete(input, {
        minChars: 1,
        list: ["Text escaping: <xyz>tag</xyz>"]
    });
</script>

or

<input class="awesomplete" data-list="#mylist" data-minchars="1" />
<ul id="mylist">
    <li>Text escaping: &lt;xyz&gt;tag&lt;/xyz&gt;</li>
</ul>

Results

Typing the letter 't' in the input box will give the following incorrect suggestion (missing the <xyz> and </xyz> that was surrounding the word 'tag'):
image

Typing the letter 'x' in the input box will give the following incorrect suggestion (notice the missing '<' after the word "tag" in the suggestion):
image

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