According to this article, a handwritten vote almost deleted the voter database. I thought it was interesting they can actually hand-write their own ballots in Sweden. And yes, they actually cite the relevant XKCD.
There needs to be a word for something that is simultaneously evil and shouldn’t-be-done yet full of win. (Er, full of win if the hacker also voted for Bobby Tables.)
Tabledropping?
That’s it! On my voter card there’s a lot of incumbents running unopposed. I wonder if a write-in candidate for Robert’); DROP TABLE Votes;– would cause some havoc. It’d be better than my other usual write ins, like Anita Mandic and Oliver Clozhohf.
I tried following the link about ‘election law’ in the original link and got some editorial about not deserving to be able to vote if you can’t walk to a voting booth. I worked the elections last September over here and didn’t see any physical provisions for full-on write-in ballots, so I suspect there may be a misinterpretation here.
In any case, sneaky little hackers. Is funny.
I’ve got a Swedish friend who commented on this elsewhere, saying that the vast, vast majority of voters use printed ballots rather than handwriting them in, but that there are blank ballots around for use and that some parties distribute blank ballots which have their party name pre-printed.
Also, the ballot results were apparently online even before the vote-counting was done, so some sharp-eyed people (including my friend) noticed stuff like this before it hit the media. Some people apparently make a game out of things like voting for Donald Duck (Kalle Anka) and others, so people look for that stuff.
It still surprises me to this day that programming languages and scripts don’t sanitize inputs by default. My QBASIC interpreter from the DOS days did that.
Also, my absentee ballot has a place for write-in candidates. If I remember correctly, at the actual (computerized) voting booth, if you chose a blank, you’d get an onscreen keyboard that would not include punctuation.
The first time I met the head of the Swedish Election Authority he tried to strangle me when he discovered that I was the person who had ordered the printing of ballots for this party (you can see a photo of them in the link). He also once tried to omit the votes for “fun” parties in the official report of the elections, but parliament later forced him to account for each and every vote cast.
I just may right in Bobby Tables for all my candidates here instead of Voldemort.
First, I am gratified to see xkcd implemented in Real Life… 
Second… why in Og’s name aren’t the data entry people instructed to enter write-in ballots without any punctuation? Problem trivially solved…
So whoever was doing the data entry actually faithfully copied out “pwn DROP TABLE VALJ” for the party name?
Also re this part:
Surely it would have failed anyway, as the quote mark wasn’t included?
On re-read, I especially love how the write-in name starts with “pwn”… 
I wondered what those were for. Ignorance fought.