Fix incorrectly appended square brackets to a multiple select box

If an explicit name has been given and it already ends with "[]"

Before:

    select(:category, [], {}, multiple: true, name: "post[category][]")
    # => <select name="post[category][][]" ...>

After:

    select(:category, [], {}, multiple: true, name: "post[category][]")
    # => <select name="post[category][]" ...>
Fix failing test regarding console change to fix sandboxing

Introduced in be3e10cd26bc8ec29c6474d03a08a8e733108e7d.
Remove extra whitespace and fix a comment

minor comment fix for consistency
Merge pull request #9623 from Agis-/patch-2

Remove extra whitespace and fix a comment
Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets

Fix incorrectly appended square brackets to a multiple select box

Before:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][][]" ...>

After:

    select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
    # => <select name="post[category][]" ...>