Commit 1c9a507c authored by Thomas Sibley's avatar Thomas Sibley
Browse files

Seriously, just escape everything that isn't valid in element IDs

jQuery interprets periods and colons as CSS selectors.  This change will
break existing cookies for people's hidden/shown preferences, but it'll
be in a major release at least.
parent ee4ad902
......@@ -88,7 +88,8 @@ my $title_b64 = MIME::Base64::encode_base64(Encode::encode_utf8($title), '');
my $tid = "TitleBox--$page--" .
join '--', ($class, $bodyclass, $title_b64, $id);
$tid =~ s{[^A-Za-z0-9\-_:\.]+}{_}g;
# Replace anything that ISN'T alphanumeric, a hyphen, or an underscore
$tid =~ s{[^A-Za-z0-9\-_]}{_}g;
my $i = 0;
$i++ while $m->notes("$tid-$i");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment