Benjamin_D
(Benjamin Decotte)
August 4, 2021, 2:44pm
1
I haven’t categorized the topic as bug because it might be by design, not sure…
so this works
https://fr.wikipedia.org/wiki/Th%C3%A9ologie#Platon
Le premier à avoir employé le terme est le Grec Platon qui, dans La République (II, 379 a - 383 c), met dans la bouche d'Adimante, l'interlocuteur de Socrate, le mot θεολογία à propos de la mythologie, pour désigner la « science de la divinité » ou un discours vrai sur les dieux :
this doesn’t
https://fr.wikipedia.org/wiki/Th%C3%A9ologie#La_th%C3%A9ologie_selon_Aristote
La mise en forme de cet article est à améliorer (janvier 2024).
La mise en forme du texte ne suit pas les recommandations de Wikipédia : il faut le « wikifier ».
Les points d'amélioration suivants sont les cas les plus fréquents. Le détail des points à revoir est peut-être précisé sur la page de discussion.
Pour une aide détaillée, merci de consulter Aide:Wikification.
Weirdly the span ids are La_th.C3.A9ologie_selon_Aristote and La_théologie_selon_Aristote so I think there is something here: discourse/lib/onebox/engine/wikipedia_onebox.rb at 2f28ba318c3f650b1a0a76530021bc21bc8ab6f6 · discourse/discourse · GitHub
Also, the link at the top, where I linked to #automatic-header-anchor-links shows me that oneboxing doesn’t (yet? ) know about the section for discourse-internal anchor links, though it does for wikipedia anchor oneboxing (which is awesome). So I’m hoping that oneboxing can grow that soon.
I sure hope so!
1 Like
Falco
(Falco)
August 4, 2021, 2:49pm
2
Both of your oneboxes work just fine for me in Android
Benjamin_D
(Benjamin Decotte)
August 4, 2021, 2:56pm
3
The links work yes, but for the second one the excerpt should be:
La poésie et les origines de la pensée… etc
ps. you had me for a second here!
Falco
(Falco)
August 4, 2021, 3:52pm
4
Oh you want the onebox summary to reflect the sub-section? That is controlled by
That is not matching
<h3>
<span id="La_th.C3.A9ologie_selon_Aristote"></span>
<span id="La_théologie_selon_Aristote">La théologie selon Aristote</span>
</h3>
The code is over 7 years old, so it’s very possible that the Wikipedia markup changed in the meanwhile. It’s a pr-welcome if someone wants to work on this.
2 Likes
jbalsas
(Chema Balsas)
August 11, 2021, 9:20pm
5
I’ve sent a possible fix at Fix/wikipedia oneboxing with url encoded hash by jbalsas · Pull Request #14015 · discourse/discourse · GitHub .
I think unescaping the m_url_hash_name should be enough to cover all cases.
Hope this is the right process to contribute!
3 Likes