Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text input filter failed with html tags inside <td></td> #19

Closed
tinotk opened this issue Apr 22, 2016 · 3 comments
Closed

Text input filter failed with html tags inside <td></td> #19

tinotk opened this issue Apr 22, 2016 · 3 comments
Labels

Comments

@tinotk
Copy link

tinotk commented Apr 22, 2016

Consider the table below, the search function for text input filter works fine on the first <td></td>, but failed on the third <td></td>. If I striped all the html tags inside the third td leaving just the text, the search works fine. Please advise.

<tbody>
    <tr>
        <td><a href="xyz/abc/"><strong>Title A</strong></a>&nbsp;<span class="badge"><small>0</small></span>&nbsp;</td>
        <td><span class="label label-info">Cat A</span></td>
        <td><small><a href="search/one+two+three">One Two Three</a></small></td>
    </tr>
    <tr>
        <td><a href="xyz/abc/"><strong>Title B</strong></a>&nbsp;<span class="badge"><small>0</small></span>&nbsp;</td>
        <td><span class="label label-info">Cat A</span></td>
        <td><small><a href="search/one+two+three">One Two Three</a></small></td>
    </tr>
    <tr>
        <td><a href="xyz/abc/"><strong>Title C</strong></a>&nbsp;<span class="badge"><small>0</small></span>&nbsp;</td>
        <td><span class="label label-info">Cat A</span></td>
        <td><small><a href="search/four+five+six">Four Five Six</a></small></td>
    </tr>
    <tr>
        <td><a href="xyz/abc/"><strong>Title D</strong></a>&nbsp;<span class="badge"><small>0</small></span>&nbsp;</td>
        <td><span class="label label-info">Cat C</span></td>
        <td><small><a href="search/one+two+three">One Two Three</a></small></td>
    </tr>
    <tr>
        <td><a href="xyz/abc/"><strong>Title E</strong></a>&nbsp;<span class="badge"><small>0</small></span>&nbsp;</td>
        <td><span class="label label-info">Cat B</span></td>
        <td><small><a href="search/asdf">Nine Ten</a></small></td>
    </tr>
</tbody>

@Holt59 Holt59 added the bug label Apr 22, 2016
@Holt59
Copy link
Owner

Holt59 commented Apr 22, 2016

Should be fixed by 8f4dbf7.

@tinotk
Copy link
Author

tinotk commented Apr 23, 2016

I discovered a quick and dirty workaround was to put an &nbsp; before closing the </td>. Thanks for adding the strip tags function. That fixes the issue.

@Holt59
Copy link
Owner

Holt59 commented Apr 23, 2016

The &nbsp; tricks work but it will make the search a bit weird since the tags will also be matched (e.g. span will match every line in your case).

I am closing this if this is ok for you, feel free to reopen if it does not work as intended.

@Holt59 Holt59 closed this as completed Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants