1 | /**
|
2 | * Copyright (c) 2013-present, Facebook, Inc.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | */
|
8 |
|
9 | ;
|
10 |
|
11 | var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
|
12 |
|
13 | /**
|
14 | * Escapes attribute value to prevent scripting attacks.
|
15 | *
|
16 | * @param {*} value Value to escape.
|
17 | * @return {string} An escaped string.
|
18 | */
|
19 | function quoteAttributeValueForBrowser(value) {
|
20 | return '"' + escapeTextContentForBrowser(value) + '"';
|
21 | }
|
22 |
|
23 | module.exports = quoteAttributeValueForBrowser; |
\ | No newline at end of file |