Skip to content

Possible bug in tooltip caption binding when content has escaped apostrophe #80

Open
@simon-20

Description

@simon-20

Hi,

I've found a possible bug in the tooltip binding. If the title has an escaped apostrophe in its content, then calls to ko.applyBindings fail.

That is, something like the following fails:

<span class="fa fa-question-circle" data-bind="tooltip: { title: 'Hey, I&#x27;m a tooltip help string!', placement: 'top' }" aria-hidden="true"></span>

Swapping the quotes styles around fixes the issue, so this works:

<span class="fa fa-question-circle" data-bind='tooltip: { title: "Hey, I&#x27;m a tooltip help string!", placement: "top" }' aria-hidden="true"></span>

But it seems like the first version should work fine. There is a demo here:

http://simonkittle.com/dev/ko-bootstrap-binding-error/

It makes no difference whether the apostrophe is escaped with &#x27;, &#39; or &apos;.

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