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

Prevent HTML tags in title #3540

Closed
wants to merge 1 commit into from
Closed

Conversation

NickMaev
Copy link

If the ajax response data has HTML tags they will be excluded.

If the response has HTML tags it was also in title, which has not render
the HTML code.
@kevin-brown
Copy link
Member

Do you want to add a quick unit test for this? So we can ensure this doesn't regress in the future.

Also, does this affect the multiple select as well?

@lagunawebdesign
Copy link

lagunawebdesign commented Jul 19, 2016

+1
Should be option renderTitle: false or:

templateResult: _mainTemplates, 
templateSelection: _mainTemplates,
...
function _mainTemplates(data){
...
data.title = data.text; // title fix (no html)
...
}

for temp solution I use:

selectInput.select2({..}).on('change', function(){
                // temp
                $(".select2-selection__rendered").removeAttr('title');
            })

@stale
Copy link

stale bot commented Mar 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented May 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label May 18, 2019
@stale stale bot closed this May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants