Merge pull request 'Fix HTML attribute parsing for escaped quotes' (#3476) from mkljczk/pleroma-fe:attrs-parsing-fix into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3476
This commit is contained in:
commit
a9172acd35
2 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ export const getAttrs = (tag, filter) => {
|
|||
.replace(/\/?$/, '')
|
||||
.trim()
|
||||
const attrs = Array.from(
|
||||
innertag.matchAll(/([a-z]+[a-z0-9-]*)(?:=("[^"]+?"|'[^']+?'))?/gi),
|
||||
innertag.matchAll(/([a-z]+[a-z0-9-]*)(?:=((?:"(?:\\.|[^"\\])*")|(?:'(?:\\.|[^'\\])*')))?/gi),
|
||||
)
|
||||
.map(([, key, value]) => [key, value])
|
||||
.map(([k, v]) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue