[Solved] Templates hide all data if an "=" sign is included

+6 votes
310 views
I use the blue formatting template to include data extracts from sources. If the extracted data includes an "=" sign, nothing inside the template will show. Is this a known bug? Is there a fix for it?

I've set up a demonstration of the problem in the referenced profile, as well as a work-around. Please don't "Fix" the issue. I will do so when discussion is complete here.

LOL I was adding the profile box template to the top of the profile to explain the messiness. I referenced it back to this discussion of "=" in templates and ... yea, nothing printed in the profile box. Revised the question to be templates in general, not just the formatting template I discovered the problem in.
WikiTree profile: Earl McGee
in WikiTree Tech by Debi Hoag G2G6 Pilot (406k points)
edited by Debi Hoag

1 Answer

0 votes
 
Best answer
Replace = with the ASCII code (= if memory serves)
by Rob Ton G2G6 Pilot (293k points)
selected by Debi Hoag
Well, yes and no. That lets the data show up in the template but the URL is now broken.

The ASCII code also doesn't get translated in the transcription text as the original character. For data extraction, I want the user to be able to read exactly as it was in the original document. For instance, I had a death certificate where the clerk used = signs in several fields as opposed to a different character in others. I'm not sure if it was on purpose or accidental, so wanted the extraction to read as it was written.
A raw equals sign is one of the few characters that cannot be used in a template parameter - that's true of all mediawiki implementations (wikipedia etc). Everything before it is interpreted as a parameter name and everything after as the value. Usually using the ASCII equivalent works... You could try using {{=}} and see if that works
Or, now that I have looked at it, including the semicolon in = would have helped ;)
I made that change.... Let me know if it looks right now...

All the best
AHA! So it was a pesky typing error on my part. That works perfectly, Rob. Thank you very much.

Off to add that to me store of text expanders. Thank the PTB for whoever recommended the "QuickTextPaste" program here on G2G not long after I started WikiTree. It literally saves me hours of typing.
or perhaps, you could probably also use the url encoded string ... %3d
Thanks, Dennis. I'll keep that one in mind too. I'm using the ASCII code in a URL right now and it works. Is there a reason I should consider changing it?
The other workaround is to use explicit parameter numbers:

{{Blue|1=anything}}

works even if the anything contains an = .

Related questions

+24 votes
2 answers
+9 votes
2 answers
+15 votes
9 answers
+6 votes
1 answer
+25 votes
9 answers

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright

...