|
10 | 10 | configurable through options provided by the clients of the
|
11 | 11 | plugin.
|
12 | 12 |
|
13 |
| - Clients, however, do not know the implementation details of the |
14 |
| - plugin, so it is important to document the capabilities of each |
15 |
| - option. Of particular importance is the documentation for the plugin |
16 |
| - options that the client is responsible for sanitizing. |
| 13 | + |
| 14 | + Clients, however, do not know the implementation details |
| 15 | + of the plugin, so it is important to document the capabilities of each |
| 16 | + option. The documentation for the plugin options that the client is |
| 17 | + responsible for sanitizing is of particular importance. |
17 | 18 |
|
18 | 19 | Otherwise, the plugin may write user input (for example, a URL query
|
19 |
| - parameter) to a web page without properly sanitizing the input first, |
| 20 | + parameter) to a web page without properly sanitizing it first, |
20 | 21 | which allows for a cross-site scripting vulnerability in the client
|
21 | 22 | application through dynamic HTML construction.
|
22 | 23 |
|
|
36 | 37 | <example>
|
37 | 38 | <p>
|
38 | 39 |
|
39 |
| - The following example shows a jQuery plugin that selects a DOM |
40 |
| - element, and copies its text content another DOM element. The |
| 40 | + The following example shows a jQuery plugin that selects a |
| 41 | + DOM element, and copies its text content to another DOM element. The |
41 | 42 | selection is performed by using the plugin option
|
42 | 43 | <code>sourceSelector</code> as a CSS selector.
|
43 | 44 |
|
|
47 | 48 |
|
48 | 49 | <p>
|
49 | 50 |
|
50 |
| - This is however not a safe plugin, since the call to |
| 51 | + This is, however, not a safe plugin, since the call to |
51 | 52 | <code>jQuery</code> interprets <code>sourceSelector</code> as HTML if
|
52 | 53 | it is a string that starts with <code><</code>.
|
53 | 54 |
|
|
0 commit comments