Skip to content

Bootstrap-transfer doesn't support <option> tag values with spaces #2

@cdeyoung

Description

@cdeyoung

As is, Bootstrap-transfer doesn't support tag values with spaces. For example, if you have the value attribute "test me" and run that through bootstrap-transfer, what you'll get is a tag that looks like this:

Test Me

And only "test" will be sent to the server.

In order to support values that have spaces, you'll need to change line 112 in bootstrap-transfer.js from:

source[i].append('<option ' + selected + 'value=' + e[0].value + '>' + e[0].content + '</option>');

to this:

source[i].append('<option ' + selected + 'value="' + e[0].value + '">' + e[0].content + '</option>');

Notice the double quotes in the value= section?

Again, great plugin with just a couple of minor issues.

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