Variables: variables in Markdown links are not interpolated (#51392)
* on a text panel first interpolate, then markdown, then sanitize; * update devenv dashboard + e2e tests * fix typo and undo changes in grafana/data * handling of config option disableSanitizeHtml more readable when preparing markdown in text panel * betterer Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
co-authored by
Ashley Harrison
parent
688164bbd6
commit
f83f05d6b3
@@ -27,7 +27,7 @@ e2e.scenario({
|
||||
`Server:pipe = A'A"A|BB\\B|CCC`,
|
||||
`Server:distributed = A'A"A,Server=BB\\B,Server=CCC`,
|
||||
`Server:csv = A'A"A,BB\\B,CCC`,
|
||||
`Server:html = A'A"A, BB\\B, CCC`,
|
||||
`Server:html = A'A"A, BB\\B, CCC`,
|
||||
`Server:json = ["A'A\\"A","BB\\\\B","CCC"]`,
|
||||
`Server:percentencode = %7BA%27A%22A%2CBB%5CB%2CCCC%7D`,
|
||||
`Server:singlequote = 'A\\'A"A','BB\\B','CCC'`,
|
||||
@@ -36,11 +36,13 @@ e2e.scenario({
|
||||
`Server:date = null`,
|
||||
`Server:text = All`,
|
||||
`Server:queryparam = var-Server=All`,
|
||||
`1 < 2`,
|
||||
`Example: from=now-6h&to=now`,
|
||||
];
|
||||
|
||||
e2e()
|
||||
.get('.markdown-html li')
|
||||
.should('have.length', 24)
|
||||
.should('have.length', 26)
|
||||
.each((element) => {
|
||||
items.push(element.text());
|
||||
})
|
||||
@@ -49,5 +51,10 @@ e2e.scenario({
|
||||
expect(items[index]).to.equal(expected);
|
||||
});
|
||||
});
|
||||
|
||||
// Check link interpolation is working correctly
|
||||
e2e()
|
||||
.contains('a', 'Example: from=now-6h&to=now')
|
||||
.should('have.attr', 'href', 'https://example.com/?from=now-6h&to=now');
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user