From a258a932d9d5f64dbc53f0577f704df2f61fd472 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Tue, 19 Aug 2008 22:06:10 +0000 Subject: [PATCH] InsetHyperlink.cpp: add "http://" when the hyperlink type is web and no protocol is specified (as requested on the lyx-devel list) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26218 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetHyperlink.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp index fed64bece2..9b75a9e0a3 100644 --- a/src/insets/InsetHyperlink.cpp +++ b/src/insets/InsetHyperlink.cpp @@ -84,6 +84,13 @@ int InsetHyperlink::latex(odocstream & os, OutputParams const & runparams) const url.replace(pos, 1, backslash + chars_url[k]); } } + + // add "http://" when the type is web (type = empty) + // and no "://" is given + docstring type = getParam("type"); + if (url.find(from_ascii("://")) == string::npos && type == "") + url = from_ascii("http://") + url; + } // end if (!url.empty()) docstring name = getParam("name"); -- 2.39.2