mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
21 lines
541 B
JavaScript
21 lines
541 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import escapeTextForBrowser from './escapeTextForBrowser';
|
|
|
|
/**
|
|
* Escapes attribute value to prevent scripting attacks.
|
|
*
|
|
* @param {*} value Value to escape.
|
|
* @return {string} An escaped string.
|
|
*/
|
|
function quoteAttributeValueForBrowser(value) {
|
|
return '"' + escapeTextForBrowser(value) + '"';
|
|
}
|
|
|
|
export default quoteAttributeValueForBrowser;
|