New Group-by headers from Bases Sort menu don’t render embedded HTML

Steps to reproduce

  1. Create Base
  2. Display note with required property (i.e. property that’s text has html wrap)
  3. In Sort menu Group-By required property
  4. See Group-By header not rendering html

Did you follow the troubleshooting guide? [Y/N]

N/A

Expected result

Group-By header renders html

Actual result

Group-By header does not render html

Environment

SYSTEM INFO:
Obsidian version: v1.10.6
Installer version: v1.8.7
Operating system: Windows 11 Enterprise 10.0.22631
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This is tied to the lack of markdown rendering support in Bases. A workaround I found was to wrap the property data in HTML and then display the property with the html() function.

At first I attempted to wrap the property inside the html() function like html(<b>testProperty</b>), but that was invalid. The working solution was to then wrap the text inside the property, so testProperty: <b>testText</b> and then html(textProperty). This rendered correctly in the cells, but failed to render in the Group-By header.

So there is a bug, but it stems from lack of markdown support, which I’ve seen other posts talking about.

HTML does render in the group value:

The formula you pasted is missing quotation marks around the literal text. It should be:

html("<b>" + testProperty + "</b>")
Toggle to see the full note from my screenshot that you can paste to test.
---
testProperty: be green
---

```base
formulas:
  exampleHTML: "html(\"<span style='color: green;'>\" + testProperty + \"</span>\")"
views:
  - type: table
    name: Table
    filters:
      and:
        - file == this.file
    groupBy:
      property: formula.exampleHTML
      direction: ASC
    order:
      - file.name

```

Now I feel dumb! I hadn’t tried it in that way. Of course not a bug. Thanks for the help!

It’s worth noting that you also have to select your modified property in the Sort-Group-By menu for it to render properly.