Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

links in label #364

Open
kotontrion opened this issue Mar 24, 2024 · 0 comments
Open

links in label #364

kotontrion opened this issue Mar 24, 2024 · 0 comments

Comments

@kotontrion
Copy link
Contributor

you can use links in labels by using the <a>tag. But this tag is not part of Pango markup and therefore it isn't recognized as valid markup and GLib.markup_escape_textis used to sanitize the text, even though it would be valid.

currently this can be circumvented by using the set_markup method to set the labels text like this:

Widget.Label({
  ...
}).on("realize", self => {
  self.set_markup("This is a <a href=\"https://www.github.com\">test link</a>")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant