]> git.lyx.org Git - features.git/commitdiff
InsetHyperlink.cpp: add "http://" when the hyperlink type is web and no protocol...
authorUwe Stöhr <uwestoehr@web.de>
Tue, 19 Aug 2008 22:06:10 +0000 (22:06 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 19 Aug 2008 22:06:10 +0000 (22:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26218 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetHyperlink.cpp

index fed64bece230293249522e56df627b5ce6498f30..9b75a9e0a3c9e3c2c02403351ae6a5dfd748dda1 100644 (file)
@@ -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");