Skip to content

Commit

Permalink
🔀 Merge pull request #65 from davep/escape-details
Browse files Browse the repository at this point in the history
Ensure the title and the excerpt get escaped
  • Loading branch information
davep authored Jan 9, 2025
2 parents 4615a03 + df028cc commit 67355fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Braindrop ChangeLog

## Unreleased

**Released: WiP**

- Fixed title and excerpt content not fully showing if there was text
wrapped in square brackets within them.
([#64](https://github.com/davep/braindrop/issues/64))

## v0.4.0

**Released: 2025-01-09**
Expand Down
5 changes: 3 additions & 2 deletions src/braindrop/app/widgets/raindrop_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
##############################################################################
# Rich imports.
from rich.emoji import Emoji
from rich.markup import escape

##############################################################################
# Textual imports.
Expand Down Expand Up @@ -254,9 +255,9 @@ def _refresh_display(self) -> None:
try:
if self.data is None or self.raindrop is None:
return
self._set("title", self.raindrop.title)
self._set("title", escape(self.raindrop.title))
self._set("borked", "Broken link!" if self.raindrop.broken else "")
self._set("excerpt", self.raindrop.excerpt)
self._set("excerpt", escape(self.raindrop.excerpt))
self._set(
"collection",
f"{PUBLIC_ICON if self.data.collection(self.raindrop.collection).public else PRIVATE_ICON}"
Expand Down

0 comments on commit 67355fe

Please sign in to comment.