(tag: MetaDefinition)
| 181 | } |
| 182 | |
| 183 | function parseSelector(tag: MetaDefinition): string { |
| 184 | const attr: string = tag.name ? 'name' : 'property'; |
| 185 | return `${attr}=${escapeSelectorValue(String(tag[attr]))}`; |
| 186 | } |
| 187 | |
| 188 | function escapeSelectorValue(value: string): string { |
| 189 | // Escape backslashes and double quotes to prevent CSS selector injection. |
no test coverage detected