Skip to content

Getting MarkupError: Expected markup style value if title contains square brackets #171

@anuarkaliyev23

Description

@anuarkaliyev23

On starting braindrop I got MarkupError: Expected markup style value (found '...(omitted)]'
I believe it is due to square bracket being unescaped, since title of link has a square brackets in it.
Locally seems to be fixed on adding escape in src/braindrop/app/widgets/raindrop_details.py as shown in this diff

class RaindropDetails(VerticalScroll):
             self._set(
                 "collection",
                 f"{PUBLIC_ICON if self.data.collection(self.raindrop.collection).public else PRIVATE_ICON}"
-                f" {self.data.collection(self.raindrop.collection).title}",
+                f" {escape(self.data.collection(self.raindrop.collection).title)}",
             )

I will create a PR with a fix.
First-time braindrop user and superficial Python user hence waiting on your validation of said issue — please tell me if I got something wrong

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingPriority: HighI really want to get to this right away (ish)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions