Page 1 of 1

Tolkien Gateway CAPTCHA is stupid (mangled wikicode)

Posted: Sat May 06, 2017 12:48 am
by 3ICE
Editing just one section: tolkiengateway.net/w/index.php?title=Elrond&action=edit&section=9 as an IP (not registered)
I write this;

Code: Select all

==Genealogy==
<div style="overflow-x: scroll; overflow-y: hidden; border: 1px solid #AAAAAA; padding: 3px; background: #EEEEEE;">
{{familytree/start}}
{{familytree| FIN |y| EAW | | | | GLN | | | | | | | | | | | | | | | |FIN=[[Finarfin]]<br /><small>''b. {{YT|1230}}''</small>|EAW=[[Eärwen]]<br /><small>''b. {{YT}}''</small>|GLN=[[Galadhon]]<br /><small>''b. {{FA}}''</small>}}
{{familytree| | | |!| | | | | |,|-|^|-|.| | | | | | | | | | | | | | |}}
{{familytree| | | GAL |~|y|~| CEL | | GLT | | | | | | | | | | | | | |GAL=[[Galadriel]]<br /><small>''b. {{YT|1362}}''</small>|CEL=[[Celeborn]]<br /><small>''b. {{FA}}''</small>|GLT=[[Galathil]]<br /><small>''b. {{FA}}''</small>}}
{{familytree| | | | | | |!| | | | | | |!| | | | | | | | | | | | | | |}}
{{familytree| | | | | | |!| | | | | | NIM |y| DIO | | TUO |y| IDR | |TUO=[[Tuor]]<br /><small>''b. {{FA|472}}''</small>|IDR=[[Idril]]<br /><small>''b. {{YT}}''</small>|DIO=[[Dior]]<br /><small>''{{FA|470}} - {{FA|506|n}}''</small>|NIM=[[Nimloth]]<br /><small>''d. {{FA|506}}''</small>}}
{{familytree| | | | | | |!| | | | | | | | |!| | | | | | | |!| | | | |}}
{{familytree| | | | | | |!| | | | | | | | ELW |~|~|y|~|~| EAR | | | |EAR=[[Eärendil]]<br /><small>''b. {{FA|503}}''</small>|ELW=[[Elwing]]<br /><small>''b. {{FA|503}}''</small>}}
{{familytree| | | | | | |!| | | | | | | | | |,|-|-|^|-|-|.| | | | | |}}
{{familytree| | | | | | CLB |~|~|~|y|~|~|~| ELR | | | | ELS | | | | |CLB=[[Celebrían]]<br /><small>''b. {{SA}}''</small>|ELR='''ELROND'''<br /><small>''b. {{FA|532}}''</small>|ELS=[[Elros]]<br /><small>''{{FA|532}} - {{SA|442}}''</small>}}
{{familytree| | | | | | |,|-|-|-|-|+|-|-|-|-|.| | | | | |:| | | | | |}}
{{familytree| | | | | | ELL | | | ELO | | | ARW |~|y|~| ARA | | | | |ELL=[[Elladan]]<br /><small>''b. {{TA|130}}''</small>|ELO=[[Elrohir]]<br /><small>''b. {{TA|130}}''</small>|ARW=[[Arwen]]<br /><small>''{{TA|241}} - {{FoA|121}}''</small>|ARA=[[Aragorn|Aragorn II]]<br /><small>''{{TA|2931}} - {{FoA|120}}''</small>}}
{{familytree| | | | | | | | | | | | | | | | | |,|-|^|-|.| | | | | | |}}
{{familytree| | | | | | | | | | | | | | | | | EDN | | DAU | | | | | |EDN=[[Eldarion]]<br /><small>''b. {{FoA}}''</small>|DAU=''unknown daughters''}}
{{familytree/end}}
</div>
but after the stupid CAPTCHA it gets turned into this mangled mess

Code: Select all

==Genealogy==<div style="overflow-x: scroll; overflow-y: hidden; border: 1px solid #AAAAAA; padding: 3px; background: #EEEEEE;">{{familytree/start}}{{familytree| FIN |y| EAW | | | | GLN | | | | | | | | | | | | | | | |FIN=[[Finarfin]]<br /><small>''b. {{YT|1230}}''</small>|EAW=[[Eärwen]]<br /><small>''b. {{YT}}''</small>|GLN=[[Galadhon]]<br /><small>''b. {{FA}}''</small>}}{{familytree| | | |!| | | | | |,|-|^|-|.| | | | | | | | | | | | | | |}}{{familytree| | | GAL |~|y|~| CEL | | GLT | | | | | | | | | | | | | |GAL=[[Galadriel]]<br /><small>''b. {{YT|1362}}''</small>|CEL=[[Celeborn]]<br /><small>''b. {{FA}}''</small>|GLT=[[Galathil]]<br /><small>''b. {{FA}}''</small>}}{{familytree| | | | | | |!| | | | | | |!| | | | | | | | | | | | | | |}}{{familytree| | | | | | |!| | | | | | NIM |y| DIO | | TUO |y| IDR | |TUO=[[Tuor]]<br /><small>''b. {{FA|472}}''</small>|IDR=[[Idril]]<br /><small>''b. {{YT}}''</small>|DIO=[[Dior]]<br /><small>''{{FA|470}} - {{FA|506|n}}''</small>|NIM=[[Nimloth]]<br /><small>''d. {{FA|506}}''</small>}}{{familytree| | | | | | |!| | | | | | | | |!| | | | | | | |!| | | | |}}{{familytree| | | | | | |!| | | | | | | | ELW |~|~|y|~|~| EAR | | | |EAR=[[Eärendil]]<br /><small>''b. {{FA|503}}''</small>|ELW=[[Elwing]]<br /><small>''b. {{FA|503}}''</small>}}{{familytree| | | | | | |!| | | | | | | | | |,|-|-|^|-|-|.| | | | | |}}{{familytree| | | | | | CLB |~|~|~|y|~|~|~| ELR | | | | ELS | | | | |CLB=[[Celebrían]]<br /><small>''b. {{SA}}''</small>|ELR='''ELROND'''<br /><small>''b. {{FA|532}}''</small>|ELS=[[Elros]]<br /><small>''{{FA|532}} - {{SA|442}}''</small>}}{{familytree| | | | | | |,|-|-|-|-|+|-|-|-|-|.| | | | | |:| | | | | |}}{{familytree| | | | | | ELL | | | ELO | | | ARW |~|y|~| ARA | | | | |ELL=[[Elladan]]<br /><small>''b. {{TA|130}}''</small>|ELO=[[Elrohir]]<br /><small>''b. {{TA|130}}''</small>|ARW=[[Arwen]]<br /><small>''{{TA|241}} - {{FoA|121}}''</small>|ARA=[[Aragorn|Aragorn II]]<br /><small>''{{TA|2931}} - {{FoA|120}}''</small>}}{{familytree| | | | | | | | | | | | | | | | | |,|-|^|-|.| | | | | | |}}{{familytree| | | | | | | | | | | | | | | | | EDN | | DAU | | | | | |EDN=[[Eldarion]]<br /><small>''b. {{FoA}}''</small>|DAU=''unknown daughters''}}{{familytree/end}}</div>
Notice how it's all on one line? Yeah. Even the section title becomes broken.

I told them good, in a triple edit;
→Genealogy: End tag for element "br" which is not open Fixed 20 times) (undo)
Damn it guys, your stupid captcha breaks wikicode... Undo my own contribution (revision 293133)
→Genealogy: End tag for element "br" which is not open Fixed 20 times, twice now. (And YOU, fix your CAPTCHA! When editing just one section it removes all line breaks.)

Re: Tolkien Gateway is stupid (mangled wikicode)

Posted: Sat May 06, 2017 6:56 am
by DieKralle
Without the captcha, you would have a bot spam again, but they can also try to fix their captcha.

Re: Tolkien Gateway is stupid (mangled wikicode)

Posted: Sat May 06, 2017 6:57 am
by 3ICE
Yeah gotta fix the captcha. Also bots easily defeat these Google-able answers, like "What is the name of the editor of Silmarillion?". Only deters human editors, not bots.

Re: Tolkien Gateway CAPTCHA is stupid (mangled wikicode)

Posted: Fri May 19, 2017 2:50 pm
by 3ICE
They were unable to reproduce without repro steps, so I proposed a different, more accurate, detailed, and in-depth description. Let us hope!

Edit: Copy pasting could be the problem instead of the Captcha. Or a combination of both?

Edit 2: Repro steps and misc stuff:

Could it be copy-pasting itself? Because it was not just those decorative line breaks. Also the important one after the section heading. Now that line break is super crucial to wikitext parsing. Try this:
Log out
Click http://tolkiengateway.net/w/index.php?t ... did=292706
Copy-paste everything from the wikiEditor-iframe into your favorite text editor.
Reproduce my fix, e.g.: Search&Replace "/br" with "br/" and also add 16 line breaks — What I did was replace {{fam with \r\n{{fam
Copy&paste the fixed code back into the textbox on the website.
Submit
Solve CAPTCHA (And notice how the newline is removed even after the section title.)
Submit anyway, if you want to confirm that page layout is indeed broken.
Before: ==Genealogy==\n<div...
After: ==Genealogy==<div...
Thanks for all the messages! (Not sure what Ederchil meant with immediate coming and elsewhere complaining, but I appreciate it nonetheless.) I just want to help.