Skip to content

Commit

Permalink
Filter: Escape quotes in select options. See #1527
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 15, 2018
1 parent 8703f25 commit aa11383
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/widgets/widget-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1783,13 +1783,13 @@
options += '<option';
for ( val in option ) {
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
options += ' ' + val + '="' + option[ val ] + '"';
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '&quot;' ) + '"';
}
}
if ( !option.value ) {
options += ' value="' + option.text + '"';
options += ' value="' + option.text.replace( tsfRegex.quote, '&quot;' ) + '"';
}
options += '>' + option.text + '</option>';
options += '>' + option.text.replace( tsfRegex.quote, '&quot;' ) + '</option>';
// above code is needed in jQuery < v1.8

// make sure we don't turn an object into a string (objects without a "text" property)
Expand Down

0 comments on commit aa11383

Please sign in to comment.