Anon 03/13/2024 (Wed) 06:17 No.9826 del
>>9818
What was done in a previous version of Ponibooru Restored: .json -> .js -> JSON.parse. This probably wastes too much memory or CPU seconds. Better (now used): .js -> array. Due to some issues, I gotta regenerate the array. This should be everything to make large diverse text work in JS-friendly strings to be set into HTML TAG ATTR="$string":
. https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Strings and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#escape_sequences
.. didn't know about Bash-like concatenation with "backtick" strings
.. from that rclone directory listing, the only escape in JSON is \[something] I think, so look for that. Then look for text which might be seen as escape in JS or doesn't work in src="" or href="". Can be done no-problem to a copy of pony-art-image_archives-ponibooru.org.json: (vim):%s/\\"/"/g

Will do minimal encoding since this works:
>a href="https://gateway.pinata.cloud/ipfs/QmdZhsPE4ZweMSqiVGLDPHc2FoVtiq9bPhhmY4tLMxFf1a?filename=test scootachan ponychan scootaloo.png">test1</a>

Gotta encode " in filenames:
>a href="https://gateway.pinata.cloud/ipfs/QmTUD71Z2GkvbJJ9rgKNsFwNZVR8NKE8iU5WerpiRt8sYF?filename=a %22test%22 fnameis_pinkie and aj oat - trashman.jpg">test2</a>

Test in:
. https://htmledit.squarefree.com/
.. website is down, so use https://web.archive.org/web/20240308001000if_/https://htmledit.squarefree.com/

>>9825

Message too long. Click here to view full text.