Task query section breaks when heading is `?`
What happened?
When I grouped tasks by section, a task that was in a heading called ?, had its section link broken, it points to nowhere and says as much when hovered.
Here's the markdown:
## ?
- [ ] task


DQL
task
group by section
JS
No response
Dataview Version
0.5.41
Obsidian Version
0.15.7
OS
Windows
@NomarCub If you try making an internal link in Obsidian to that heading, can it find it? If you add any alphanumeric character to the heading, do things work better? Obsidian strips some set of special characters off of heading names when using them in links, and dataview is just using the information it is getting from Obsidian.
Adding alphanumeric characters fixes it.
Auto-completing a link to the heading fails (strips the ?), but I can make a manual link to it just fine (e.g. like this: [[#?]]).
Edit: links like this look fragile, and the stripping is irreversible. If I have another heading, say ## ! in the same document, then only the first of these links is accessible. So [[#!]] will point to ## ? if it's the first "strip-endangered" heading in the file.
Do you know if there's already a request to fix this stripping ambiguity on Obsidian's side?
Adding alphanumeric characters fixes it. Auto-completing a link to the heading fails (strips the
?), but I can make a manual link to it just fine (e.g. like this:[[#?]]).
Great, glad that worked! That has been my experience in Obsidian also.
Edit: links like this look fragile, and the stripping is irreversible. If I have another heading, say
## !in the same document, then only the first of these links is accessible. So[[#!]]will point to## ?if it's the first "strip-endangered" heading in the file.
Nice phrasing!
Do you know if there's already a request to fix this stripping ambiguity on Obsidian's side?
I do not know! I spent some time looking recently and was unable to figure out exactly what characters are stripped from headings, much less how to deal with it. Maybe check the Obsidian Forums to see if anyone has filed an issue about this - and make your own if not? Either way, as far as I can tell this is entirely an Obsidian thing and not a dataview one. Good luck!
I looked around and didn't see a similar thread in the forums, so I created a new one. See Headings with special characters have broken links and renaming.
Apparently, this is not a bug, but a feature. So I made a feature request too: Support special characters in headings for linking.
Given that there's no official Obsidian support, feel free to close this, if it's too much effort.
NomarCub, thank you for finding out that it is all non-alphanumeric characters! I wonder how that is defined in the unicode space. That does make it tricky for plugins: there is a strong argument for staying consistent with Obsidian's behavior and another strong argument for making the links work properly in aituations like yours. dataview folks, sorry for the spurious notifications.
As it turns out, it's not all non alphanumeric characters, only "punctuation characters" get stripped. See the original bug thread on the forum.