From 24d66b5173963dcb69545614449de91da5397db6 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Tue, 14 Feb 2017 00:42:11 +0100 Subject: Extensions: Add 'appearance="url"' to desccription parameters. It allows to create and add a clickable plain text link to extensions The description parameter's text is escaped and converted to a URL as-is preventing potential security issues The Scour extension shows a first example implementation (bzr r15519) --- src/extension/param/description.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/extension/param/description.cpp') diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index 3d970b204..7cf818280 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -80,6 +80,9 @@ ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node label->set_markup(Glib::ustring("") + Glib::Markup::escape_text(newguitext) + Glib::ustring("")); label->set_margin_top(5); label->set_margin_bottom(5); + } else if (_mode == URL) { + Glib::ustring escaped_url = Glib::Markup::escape_text(newguitext); + label->set_markup(Glib::ustring::compose("%1", escaped_url)); } else { label->set_text(newguitext); } -- cgit v1.2.3