olafmoriarty / blue-bots-done-quick

A version of Cheap Bots, Done Quick written for Bluesky
Apache License 2.0
13 stars 1 forks source link

tracery breaks website. #15

Closed alien-sunset closed 1 week ago

alien-sunset commented 1 week ago

I'm trying to add a new bot, and my code seems to be breaking the actual website itself. https://bsky.app/profile/grandmas-quilt.bsky.social

if you can peak at my BBDQ for that bot, you can see all the code I can safely add and save. that last svg text bit should be

"row1": [ "<text x='-7' y='40' fill='#color#' font-size='68'>#box#</text><text x='33' y='40' fill='#color#' font-size='68'>#box#</text><text x='73' y='40' fill='#color#' font-size='68'>#box#</text><text x='113' y='40' fill='#color#' font-size='68'>#box#</text><text x='153' y='40' fill='#color#' font-size='68'>#box#</text><text x='193' y='40' fill='#color#' font-size='68'>#box#</text><text x='233' y='40' fill='#color#' font-size='68'>#box#</text><text x='273' y='40' fill='#color#' font-size='68'>#box#</text><text x='313' y='40' fill='#color#' font-size='68'>#box#</text><text x='353' y='40' fill='#color#' font-size='68'>#box#</text>" ],

but adding "#box#" breaks the entire web site and turns it into just a flat blue background

image

(it appears to be the "x" in box that is the problem, as I can type "##" and "#bo#" with no issue, but as soon as I type the "x" the site goes blue.)

olafmoriarty commented 1 week ago

Should work now (refresh the page).

The preview component converts SVGs to Base64 to display them as images, and the function I was using to do that didn't support SVGs containing non-Latin characters.