X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fwikilib.ml;h=9651aadd39dde19d2d95a99dd1808595966c0046;hb=6eacefcb7258db7b56fe796af84961cafac90eac;hp=b11b5900767124b8bce037dd45a99be005ca802d;hpb=019c80476c64b5cd86b6e9d115c86162b2ae462c;p=cocanwiki.git diff --git a/scripts/wikilib.ml b/scripts/wikilib.ml index b11b590..9651aad 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.11 2004/10/09 11:03:58 rich Exp $ + * $Id: wikilib.ml,v 1.12 2004/10/11 14:13:04 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 @@ -43,7 +43,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' .. ' ' | '<' | '>' | '&' | '"' | '+' -> '_' + String.map (function + '\000' .. ' ' | '<' | '>' | '&' | '"' | '+' | '#' | '%' + -> '_' | c -> Char.lowercase c) title in (* Check URL is not too trivial. *)