forked from MapComplete/MapComplete
Fix: wikipedia icon links now uses the "link"-special rendering which properly escapes single quotes, fix #2340
This commit is contained in:
parent
c53034d305
commit
bfd6874516
1 changed files with 15 additions and 2 deletions
|
@ -18,7 +18,13 @@
|
|||
"defaults",
|
||||
"in_favourite"
|
||||
],
|
||||
"render": "<a href='https://wikipedia.org/wiki/{wikipedia}' target='_blank' rel='noopener'><img src='./assets/svg/wikipedia.svg' textmode='📖' alt='Wikipedia'/></a>",
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "link",
|
||||
"href": "https://wikipedia.org/wiki/{wikipedia}",
|
||||
"text": "<img src='./assets/svg/wikipedia.svg' textmode='📖' alt='Wikipedia'/>"
|
||||
}
|
||||
},
|
||||
"condition": {
|
||||
"or": [
|
||||
"wikipedia~*",
|
||||
|
@ -29,7 +35,14 @@
|
|||
{
|
||||
"#": "ignore-image-in-then",
|
||||
"if": "wikipedia=",
|
||||
"then": "<a class='h-8' href='https://www.wikidata.org/wiki/{wikidata}' target='_blank' rel='noopener'><img src='./assets/svg/wikidata.svg' alt='Wikidata'/></a>"
|
||||
"then": {
|
||||
"special": {
|
||||
"type": "link",
|
||||
"class": "h-8",
|
||||
"href": "https://www.wikidata.org/wiki/{wikidata}",
|
||||
"text": "<img src='./assets/svg/wikidata.svg' alt='Wikidata'/></a>"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue