Because of the way the search descriptions just hack the top off a page, including HTML tags, it's making the search page often unreadable if the wrong page gets pulled into the results. I tried to just hide the descriptions, BUT it turns out the description portion of results is in a <p> tag, which auto-closes when it reaches a bunch of other tags.
Has anyone come up with any clever workarounds for this? I wish the descriptions were div tags; then this would have been a two second fix.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Do you have an example page or screenshot that I can look at?
GM of Stream of Kairos - 2025 Campaign of the Year
GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM
GM of Core: The Ashes of Alcarna - April 2020 CotM
Need CSS Help? It may be covered here: Abersade's CSS Hub
Here are a few screenshots that should show the issue:


This one shows what I'm trying to avoid: the search pulls out the terms from the middle of articles with html formatting, producing unreadable gibberish for the descriptions.
So THIS is one example of what it looks like when I set the <p> tags within the search results to not display:
Note that part of the broken description is still showing for the Dragons article. For reference, this is what that portion of the article ACTUALLY looks like:

And here is another example of the broken descriptions "breaking out" of the hidden <p> tags:

The relevant CSS code used is:
.campaign-search-page .search-result p { display: none; }
Hiding just the "description" class did even less, but this isn't enough either. The problem is that the <p> tag that's meant to ENCLOSE the whole description is instead automatically closed by browsers as soon as the search description contains a <p> tag. It breaks everything past that point out of CSS control.
@imaria
Hi friend! I'll pass this question along to the devs, in the meantime the screenshot would be helpful if you could provide one!
@C4RB0N
The screenshots are up! The thing that would need changing is that the "description" class field shouldn't be a <p> tag; it should be a <div> tag. The description class might need some adjustment to make it behave like a p tag, but it honestly might not.
The separate, larger issue is that the search results don't strip out HTML, but I suspect that would be a much larger fix.
Gotcha, okay - relaying this back to the team, thank you! @imaria
Obsidian Portal Support Druid | [email protected]
@imaria We heard back from the Devs:
Okay - let us know if it worked!
Obsidian Portal Support Druid | [email protected]
You got it! :) @imaria
Obsidian Portal Support Druid | [email protected]
Hi @imaria ! Our devs took a second look at this and we'd like to see if you could check the results again and see if they are better now or not?
@C4RB0N
Oh, wow. They are vastly better now! As in, I can now disable the helpful description hiding CSS that was just enabled (though I can still use the div tag to correctly format the descriptions, so that's still useful).
Many, many thanks!