Incorrect autocompetion for hash wikilinks with percent sign

Steps to reproduce

  1. Create a note with a heading in it, which includes a percent sign, such as ## the 30% rule.
  2. In the same note, type [[# to trigger the autocompleter for a hash link.
  3. Choose the 30% rule heading from the suggestions.

Expected result

[[#the 30% rule]] should be inserted into the document.

Actual result

[[#the 30 rule]] gets inserted, with the percent sign missing.

Interestingly though the link works when clicked, despite having an incomplete hash value.

Environment

  • Operating system: macOS 10.14.6
  • Debug info:

SYSTEM INFO:
Obsidian version: v0.13.19
Installer version: v0.12.19
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Safe mode: on

RECOMMENDATIONS:
none

This is not a bug. Links are sanitized.

Thank you for the quick reply @WhiteNoise! The help only mentions the removal of <script> tags, so I wasn’t suspecting security reasons here.

What is the rationale behind this? The autocompeter sanitizes the heading content, but I can manually go back and reinsert the percent signs (or periods etc.) into my links.