I have a MediaWiki 1.34.0 Hebrew website with only one extension (ContactPage) and I prefer not to install any further extensions.
I understand that a proper references/footnotes mechanism for Hebrew MediaWiki websites, requires installing extra modules beyond the core Cite as well as working with very complex Wiki syntax templates which is something I want to avoid; therefore, I desire to use the following templates and JavaScript as a frontend alternative:
footnotes_list
<includeonly><ol class="footnotes_list"></ol></includeonly><noinclude> [[קטגוריה:תבניות]] </noinclude>
footnote
<includeonly><span dir="rtl" class="footnote"><sup class="footnote_inner">{{{1}}}</sup></span></includeonly><noinclude> [[קטגוריה:תבניות]] </noinclude>
JavaScript (non Babelified)
document.querySelectorAll(".footnote>sup").forEach((element, i) => { const li = document.createElement("li"); li.append(...element.childNodes); element.textContent = i + 1; const footnotes_list = document.querySelector(".footnotes_list"); footnotes_list.appendChild(li); }); const numbers = Array.from(Array(100)).map((e,i)=>i+1) document.querySelectorAll(".footnote").forEach( (element, i)=>{ element.setAttribute("href", `#footnote_${numbers[i]}`) element.setAttribute("id", "fn_"+numbers[i]); }); document.querySelectorAll(".footnotes_list>li").forEach( (element, i)=>{ element.setAttribute("id", "footnote_"+numbers[i]); element.setAttribute("href", `#fn_${numbers[i]}`) });
My problem
<a>
tags aren't parsed correctly → I get the output instead a footnote number, anywhere:
<a dir="rtl" class="footnote">או מבוססת מערכת הפעלה עם ליבות אחרות</a>
My question
What might cause <a>
tags not to be parsed correctly?