X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fwikilib.ml;h=081385fbf885d2970efafc4d36943c6eea826540;hb=eeb304015c65ccf593a77058d5db5f5a3e3b45d5;hp=77ba13a9882cf0e582994512f5065871bccf43c1;hpb=3986e1738463c7e5462691fd2c454a404f9b3524;p=cocanwiki.git diff --git a/scripts/wikilib.ml b/scripts/wikilib.ml index 77ba13a..081385f 100644 --- a/scripts/wikilib.ml +++ b/scripts/wikilib.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: wikilib.ml,v 1.6 2004/09/17 15:09:48 rich Exp $ + * $Id: wikilib.ml,v 1.7 2004/09/25 16:05:03 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,8 +42,9 @@ let nontrivial_re = Pcre.regexp ~flags:[`CASELESS] "[a-z0-9]" let generate_url_of_title (dbh : Dbi.connection) hostid title = (* Create a suitable URL from this title. *) - let url = String.map (function '\000' .. ' ' | '<' | '>' | '&' | '"' -> '_' - | c -> Char.lowercase c) title in + let url = + String.map (function '\000' .. ' ' | '<' | '>' | '&' | '"' | '+' -> '_' + | c -> Char.lowercase c) title in (* Check URL is not too trivial. *) if not (Pcre.pmatch ~rex:nontrivial_re url) then