Skip to content

Commit

Permalink
#620@patch: HTMLOptionElement.value should not sanitize the value (ne…
Browse files Browse the repository at this point in the history
…w lines and trimming).
  • Loading branch information
capricorn86 committed Oct 14, 2022
1 parent fca8d47 commit 8356a0a
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -3,8 +3,6 @@ import IHTMLElement from '../html-element/IHTMLElement';
import IHTMLFormElement from '../html-form-element/IHTMLFormElement';
import IHTMLOptionElement from './IHTMLOptionElement';

const NEW_LINES_REGEXP = /[\n\r]/gm;

/**
* HTML Option Element.
*
Expand Down Expand Up @@ -113,6 +111,6 @@ export default class HTMLOptionElement extends HTMLElement implements IHTMLOptio
* @param value Value.
*/
public set value(value: string) {
this.setAttributeNS(null, 'value', String(value).trim().replace(NEW_LINES_REGEXP, ''));
this.setAttributeNS(null, 'value', value);
}
}

0 comments on commit 8356a0a

Please sign in to comment.