Commit Graph

1559 Commits

Author SHA1 Message Date
Alex Schroeder
4291b15b8f Use decoded_content for HTTP::Response 2012-10-26 16:38:22 +02:00
Alex Schroeder
1f9c035929 Many additions by Aurélien Desbrières. 2012-10-25 10:21:01 +02:00
Alex Schroeder
2052d8af91 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-10-25 08:55:10 +02:00
Alex Schroeder
f4e6cdd5a4 Add module description. 2012-10-25 08:54:53 +02:00
Alex Schroeder
1936772f18 no longer need to encode UTF-8 strings: it's the default 2012-10-22 11:28:26 -04:00
Alex Schroeder
5f3c72a576 Switch tex.pl to rules instead of macros. 2012-10-18 23:36:44 +02:00
Alex Schroeder
008a797e3a Commented utf8::encode in DoTagsReindex
This was recommended by Erik on the wiki because he found Latin-1
encoded page names in the Tag DB.
2012-09-30 09:39:37 +02:00
Alex Schroeder
7783d26bdf git.pl: run "git add ." as part of maintenance. 2012-08-14 21:41:19 +02:00
Alex Schroeder
a5b2fab882 In DoTagsReindex, call utf8::encode on the id before adding it to the index.
I'm not sure why this is necessary. My tests in t/test.t work just
fine on my Mac with mac.pl installed. Without it, reindexing results
in a silent crash of Perl on the machine where emacswiki.org is
installed.
2012-08-05 01:59:20 +02:00
Alex Schroeder
92da7063e9 Fixed UTF-8 support in various automated tests.
Issues:

- the Mac layer was masking issues because of the NFC/NFD difference and existing compatiblity hacks in mac.pl
- drafts.pl was suffering from a double encoding issue
- crossbar.t and download.t tests were failing because I had recently fixed DoDownload output to be raw instead of encoded
- test.pl now has a way to capture the raw, unencoded output produced by DoDownload
- tags.t got some tests to prove that recent changes to wiki.pl actually work
2012-07-30 23:30:27 +02:00
Alex Schroeder
21fc52a4ca Use utf8::decode on filenames passed to PageIsUploadedFile
Without this, search will break on pagenames with non-ASCII characters.
I noted this in conjunction with tags.pl. There, I needed to encode
the page names for search to work correctly.
2012-07-30 18:18:29 +02:00
Alex Schroeder
33e071b630 Use bsd_glob instead of glob.
Glob will split patterns on whitespace and non-breaking spaces are now
treated as whitespace.
2012-07-21 00:40:42 +02:00
Alex Schroeder
188e219790 $q->path_info lacks UTF-8 decoding.
Fix other encoding issues with namespaces.
2012-07-19 09:05:07 -04:00
Alex Schroeder
eb876d33cb Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-07-19 14:01:04 +02:00
Alex Schroeder
af51f7fd8d Use utf8::encode when creating a directory.
There is no way to provide an encoding layer to directory names.
Therefore they need to be raw bytes and not characters. This becomes
apparent when creating namespaces containing non-ASCII characters.
2012-07-19 13:58:58 +02:00
Alex Schroeder
ab624787c4 Changed \x{ffff} to \x{fffd} in all regular expressions.
Using Perl 5.8.8 resulted in a crash when compiling regular expressions referring to \x{ffff}.
2012-07-19 06:01:30 -04:00
Alex Schroeder
ac19c5ce42 Fixed encoding of brazilian-portuguese-utf8.pl.
Some left-over texts for bulgarian-utf8.pl and chinese-utf8.pl.
2012-07-19 05:42:03 -04:00
Alex Schroeder
99ceb3bd21 Set $ModulesDescription to an appropriate link for all translation files. 2012-07-18 18:16:57 +02:00
Alex Schroeder
e29b7415d6 Add link to documentation for %Smilies. 2012-07-18 10:58:58 +02:00
Alex Schroeder
df9d3ee677 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse 2012-07-06 15:40:36 +02:00
Alex Schroeder
2c6428e652 On some encoding problems
The TOC extension causes problems when including non-ASCII Text.
2012-07-04 21:36:56 +02:00
Alex Schroeder
fba59ab8f5 Removed statement that had no effect but caused an error when opening a non-ASCII page
The page in question was "Übersicht" on Emacs Wiki.
2012-07-04 17:14:51 +02:00
Alex Schroeder
a59910983a duplicate use utf8 removed 2012-07-04 16:43:12 +02:00
Alex Schroeder
bf28666215 use utf8; 2012-07-04 15:26:08 +02:00
Alex Schroeder
bbdda6787a Pod fix.
Changed =head to =head2 as suggested by anonymous visitor to the wiki.
2012-06-22 18:23:51 +02:00
Alex Schroeder
70fcfa1356 Fix UTF-8 decoding issue when using toc.pl
The output of ApplyRules is no explicitly decoded as UTF8.
2012-06-22 02:54:29 +02:00
Alex Schroeder
733dd11861 Added copyright year. 2012-06-14 10:21:40 +02:00
Alex Schroeder
db71c69908 Merge branch 'add-thumbs' 2012-06-14 10:19:33 +02:00
Alex Schroeder
648ff8d785 Handle the new file format for uploaded files
Recently, uploaded files don't just contain #FILE and a MIME type --
the MIME type is followed by a space and optionally more information.
I replaced the hand-coded parsing with a call to TextIsFile and added
better error checking and fixed the error messages (they used $s
instead of %s).
2012-06-14 10:04:54 +02:00
Alex Schroeder
492e9c3a37 From the wiki
Taken the version from the wiki and added the standard
$ModulesDescription.
2012-06-14 08:39:25 +02:00
Alex Schroeder
c0112919b4 Encoding the cookie and fixing drafts.pl
Drafts are saved using the username as filename. This must also be
encoded and decoded correctly. Because of NFC and NFD issues on Mac
HFS, an appropriate normalization was added to mac.pl.

As the username is also part of the cookie, this showed that the
Cookie content wasn't being encoded correctly, so that was fixed, too.
2012-05-25 11:56:46 +02:00
Alex Schroeder
8933a2cf74 Resolved conflict. 2012-05-25 08:29:34 +02:00
Alex Schroeder
e533bc3915 Fix an encoding error in namespaces.pl on Debian
The Debian installation uses ext3 and therefore raw bytes for
filenames unlike the HFS filesystem of Mac OSX.

Copyright years were updated. The maintenance output of for drafts was
cleaned up.
2012-05-25 01:00:10 +02:00
Alex Schroeder
a35c0a89c8 Merge branch 'master' of git.sv.gnu.org:/srv/git/oddmuse
Conflicts:
	modules/mac.pl
	t/encoding.t
	wiki.pl
2012-05-24 18:31:44 +02:00
Alex Schroeder
1495a29fd3 More UTF-8 fixes
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).

The mac compatibility extension will also disable the use of grep if
non-ASCII characters are searched for because of an unexplained
problem with grep.
2012-05-24 18:08:42 +02:00
Alex Schroeder
d4eb5bc21c More UTF-8 fixes
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).

The mac compatibility extension will also disable the use of grep,
because I could not get it to work (and I don't think there will be
large Oddmuse installations running on Apple's HFS).
2012-05-24 16:58:10 +02:00
Alex Schroeder
2d6b2d6a71 Remove $HttpCharset and moved everything to UTF-8
This also required some changes to the tests where explicit UTF-8
encoding had been used in the past.
2012-05-22 11:50:23 +02:00
Alex Schroeder
c9e39a4c19 getting rid of $Id$ tags in $WikiDescription
Replaced the $Id$ tags in $WikiDescription for all the modules and wiki.pl itself with a link to the source and an appropriate wiki page, if possible. This is shown in action=version and should help users figure out what another wiki has installed.
2012-04-19 02:18:45 +02:00
Alex Schroeder
69df2b05f1 (NewNamespaceBrowsePage): Allow redirection to namespaces.
(NamespacesNewGetId): Allow for the provision of the ns parameter.
2012-03-20 16:41:22 +00:00
Alex Schroeder
c9f8d09c33 Concise notation. 2012-03-18 01:03:56 +00:00
Alex Schroeder
745094f00e (NamespacesNewGetId): Fix the special case
http://example.org/cgi-bin/wiki.pl/Test?rollback-1234=foo where
Test refers to the namespace and not to the page id.
2012-03-17 19:35:19 +00:00
Alex Schroeder
b9db78830d * gravatar.pl (AddGravatar): UnquoteHtml the comment
before adding the gravatar to it.
2012-02-10 10:49:04 +00:00
Alex Schroeder
ce80a2f144 Fix quoting issues. 2012-01-31 11:10:40 +00:00
Alex Schroeder
b4f61feb20 (GetFooterLinksLogout): Add extra space as
suggested by wiki user Cayenne.
2012-01-17 18:23:07 +00:00
Alex Schroeder
26090be86f (HoneyPotInspection): Allow override using
$QuestionaskerSecretKey.
2012-01-02 22:47:01 +00:00
Alex Schroeder
bafdfad1e0 And another attempt at an offline app. 2011-12-31 03:04:35 +00:00
Alex Schroeder
b0e839d4f4 (CategoriesNewOpenPage): Instead of setting $Page{text}, set
$NewText because that's what BrowsePage uses. Handle $NewPage in
the case of mod_apache or similar environment.
2011-12-31 01:40:26 +00:00
Alex Schroeder
7107e34dcc (CategoryParse): New. Change parsing
slightly to match the description on the wiki.
(CategoryInit, GotoBarInit): Use it.
2011-12-31 00:27:33 +00:00
Alex Schroeder
374b85a8a9 Moved CSS installation to separate module. 2011-12-05 23:59:30 +00:00
Alex Schroeder
46afb63096 * honeypot.pl: Add pod.
($HoneyPotOk $HoneyPotIdiot, $HoneyPotTimestamp): New.
(HoneyPotNewGetFormStart, HoneyPotInspection): Use them.
2011-11-26 11:30:42 +00:00