Skip to content

Commit dff7465

Browse files
committed
Fix an errant regex check that doubly base64 encoded Geogebra applet states.
I disovered this thanks to an observation of @drdrew's while attempting to diagnose an issue with a Geogebra problem written by another author. It turns out that one part of the problem was the applet state being doubly base64 encoded.
1 parent 27923e4 commit dff7465

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/AppletObjects.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ sub insertAll {
137137

138138
my $base_64_encoded_answer_value;
139139
my $decoded_answer_value;
140-
if ($answer_value =~ /<XML|<?xml/i) {
140+
if ($answer_value =~ /<\??xml/i) {
141141
$base_64_encoded_answer_value = encode_base64($answer_value);
142142
$decoded_answer_value = $answer_value;
143143
} else {
144144
$decoded_answer_value = decode_base64($answer_value);
145-
if ($decoded_answer_value =~ /<XML|<?xml/i) {
145+
if ($decoded_answer_value =~ /<\??xml/i) {
146146
# Great, we've decoded the answer to obtain an xml string
147147
$base_64_encoded_answer_value = $answer_value;
148148
} else {

0 commit comments

Comments
 (0)