mirror of
https://github.com/FlipsideCrypto/og-image.git
synced 2026-02-06 10:46:43 +00:00
Sanitize width/height
This commit is contained in:
parent
dde2c24cbb
commit
5192bc20aa
@ -130,9 +130,13 @@ export function getHtml(parsedReq: ParsedRequest) {
|
||||
</html>`;
|
||||
}
|
||||
|
||||
function getImage(url: string, width ='auto', height = '225') {
|
||||
const src = sanitizeHtml(url);
|
||||
return `<img class="logo" src="${src}" width="${width}" height="${height}" />`
|
||||
function getImage(src: string, width ='auto', height = '225') {
|
||||
return `<img
|
||||
class="logo"
|
||||
src="${sanitizeHtml(src)}"
|
||||
width="${sanitizeHtml(width)}"
|
||||
height="${sanitizeHtml(height)}"
|
||||
/>`
|
||||
}
|
||||
|
||||
function getPlusSign(i: number) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user