(url)
| 107 | // gradient + initial. The URL is constrained to a clean https URL so it can't |
| 108 | // break out of the CSS url(). |
| 109 | function safeThumb(url) { |
| 110 | return typeof url === "string" && /^https:\/\/[^"'()\\\s]+$/.test(url) ? url : ""; |
| 111 | } |
| 112 | function artStyle(card) { |
| 113 | const g = (card && card.gradient) || DEFAULT_GRADIENT; |
| 114 | const t = card && safeThumb(card.thumb); |