(tag: MetaDefinition)
| 198 | } |
| 199 | |
| 200 | function parseSelector(tag: MetaDefinition): string { |
| 201 | const attr: string = tag.name ? 'name' : 'property'; |
| 202 | return `${attr}=${escapeSelectorValue(String(tag[attr]))}`; |
| 203 | } |
| 204 | |
| 205 | function escapeSelectorValue(value: string): string { |
| 206 | // Escape backslashes and double quotes to prevent CSS selector injection. |
no test coverage detected