chiark / gitweb /
Don't quote quiz question HTML
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Oct 2025 19:19:36 +0000 (20:19 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Oct 2025 19:21:16 +0000 (20:21 +0100)
template.html
utils.pl

index 461b4eb6dbc1cc14fa9d55751b496c03fbc2e348..5c3d030ad86689d5e01c938ce98c7685c273971d 100644 (file)
@@ -377,7 +377,7 @@ Hide email address from public database.
 <br>
 
 @@@if:registernew|picked@@@
-@@@quiz_question_input@@@
+@@@lit:quiz_question_input@@@
 <input type=submit name="register" value="Register.">
 @@@endif:@@@
 
@@ -406,7 +406,7 @@ a recent notification of your password, you should request a current
 password:
 <p>
 
-@@@quiz_question_input@@@
+@@@lit:quiz_question_input@@@
 <input type=submit name="mailpasswd" value="Mail password."><br>
 (The password will be sent to the registered email address for the
 entry.)
index 3528cb74d6b45fdb383eaadde2ddc5549f4bd7b4..0977e41c16adb5ee28ced399903ba39eda94de2c 100644 (file)
--- a/utils.pl
+++ b/utils.pl
@@ -84,10 +84,12 @@ sub process ($$) {
        } elsif (m/\S/) {
            s/^\@\@\@$//;
            if ($doing) {
-               s/\@\@\@(\w+)\@\@\@/ getvar_mightquote("$1", $quote_html) /ge;
+               s/\@\@\@(lit:)?(\w+)\@\@\@/
+                 getvar_mightquote("$2", !$1 && $quote_html)
+                 /ge;
                out($_);
            } else {
-               s/\@\@\@\w+\@\@\@//g;
+               s/\@\@\@(?:lit:)?\w+\@\@\@//g;
            }           
            die "$filename:$cl:unknown $_\n" if m/\@\@\@/;
        }