Hi all, I read through this issue:
https://github.com/racket/racket/issues/577 and am in the "what is going on?" category of user when it comes to HTML generation in Racket. What should I be using to generate responses from a servlet? response/xexpr? Does that generate HTML I can use practically? Or, doesn't it? I've spent a lot of time in the last few days chasing the generation of TOTP URIs for use with apps like Authy/FreeOTP/etc. I finally realized that I'm passing strings like otpauth://totp/ handin:astud...@foo.edu?secret=NODOF&issuer=handin&algorithm=SHA1&digits=6&period=30 to the Javascript layer for QR encoding. This looks bad to me. What is the best way to generate HTML from the webserver? I don't care about XML vs. HTML; I just want the fastest path to writing a small web application that solves a problem that I have, and part of that means easily generating HTML that does what I expect when I generate it. That is, (body (div ((id "QRCODE"))) (script ((type "text/javascript")) ,(format "new QRCode(document.getElementById('QRCODE'), '~a');" (generate-otp-uri email secret))))) seems not to do what I expect, which in this case is causing some rather subtle challenges to chase down. ("Why does my test for TOTP encoding pass *here*, and generate numbers that match *this* app when I enter data by hand, but fail in the same app when I read the QR code that I generated...") Pointers to relevant documentation appreciated. Cheers, Matt -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.