Commit graph

78 commits

Author SHA1 Message Date
Jacques Distler 0c2bc65e7a All I want for Christmas ...
... is to settle these encoding issues 
once and for all.

Let's override the accessor methods, which 
seems to offer a simpler solution.

Now with tests (for whatever that helps)...
2010-01-06 08:15:34 -06:00
Jacques Distler 6cf1463525 Revert Revision 520; This is more thorough
This ensures that @page.name has the right (utf8)
encoding.
2010-01-04 18:43:27 -06:00
Jacques Distler e3aa626489 Better Display of Interweb Wikilinks
Perhaps not the most creative use of CSS. But,
at least, this will read better.
2010-01-03 13:19:47 -06:00
Jacques Distler b75aa4b8d6 Fix a broken test 2009-12-27 00:41:04 -06:00
Jacques Distler 601331b508 Move Files When Renaming Web
Renaming a web should move the
corresponding subdirectory of webs/ .
Otherwise, links to uploaded files break.
2009-12-26 23:43:18 -06:00
Jacques Distler d3e79ea84a Make truncate() Unicode-aware 2009-12-14 17:41:28 -06:00
Jacques Distler 2c5e5a0015 Refactoring
Move the truncate() method into ApplicationHelper.
Move another method around, for no particularly
good reason. Controllers really shouldn't have
public methods that don't correspond to actions.
2009-12-14 02:01:50 -06:00
Jacques Distler 1613973929 Array#collect is faster than Array#inject
Also add some more tests.
2009-12-13 20:00:18 -06:00
Jacques Distler 282515d907 Source View
Add a Source view. [Based on a suggestion by Andrew Stacey]
Fix a well-formedness bug in the list action, due to
boneheaded truncation algorithm. [Reported by Roby Bartels]
2009-12-13 19:25:14 -06:00
Jacques Distler 063a8ca5a7 Fix Maruku Ruby 1.9 Bug
In Rbuy 1.8, ?c returns an integer.
In Ruby 1.9, it returns a 1-character
string. This was causing one of our
LaTeX conversion functional tests to
fail.
Fixed.
2009-12-01 21:29:07 -06:00
Jacques Distler 34b63a8375 Fix a Ruby 1.9 Character Encoding Bug
Wow, this stuff is complicated!
Some things really want to be UTF-8;
others really want to be byte strings.
2009-12-01 12:03:15 -06:00
Jacques Distler e3832c6f79 Rails 2.3.5
Upgrade to Rails 2.3.5.
Also work around this bug:
 https://rails.lighthouseapp.com/projects/8994/tickets/3524
created by the aforementioned
Rails release.
2009-11-30 19:38:34 -06:00
Jacques Distler a6429f8c22 Ruby 1.9 Compatibility
Completely removed the html5lib sanitizer.
Fixed the string-handling to work in both
Ruby 1.8.x and 1.9.2. There are still,
inexplicably, two functional tests that
fail. But the rest seems to work quite well.
2009-11-30 16:28:18 -06:00
Jacques Distler 2e52ce48df Update LaTeX Output for Revision 464 2009-11-06 21:23:18 -06:00
Jacques Distler 761f8bbb51 Links From Published Webs
Damn, but it's hard to get this right.
I think I've finally done it, though.
We'll see ...
2009-10-22 17:57:13 -05:00
Jacques Distler 5df1504255 Tests for Revision 456
Functional tests for Revision 456.
Also, fix a buglet in handling rescues
for new pages.
2009-10-19 22:57:11 -05:00
Jacques Distler aef669a923 Change some CRs to LFs 2009-10-06 11:31:15 -05:00
Jacques Distler d89769fe81 Update for itex2MML 1.3.13
Implements \mathrlap{}, \mathllap{}, and \mathclap{}.
Deprecates the use of \rlap{} (use \mathrlap{}, instead:
the latter works in math-mode in the LaTeX export, whereas
TeX's \rlap{} did not).
2009-10-05 02:36:00 -05:00
Jacques Distler 41274d64d0 Support itex2MML 1.3.12 2009-10-04 03:46:06 -05:00
Jacques Distler 3ff68ef42f Don't Expand NCRs
That operation is not idempotent (among other defects).
Instead, just check that the NCRs corespond to valid utf-8.
(Reported by Andrew Stacey)
2009-09-09 09:16:00 -05:00
Jacques Distler c79fef9c01 Clean, rather than Complain
Previously, if the user tried to submit content which was
malformed utf-8, Instiki would complain loudly to him.

A slightly more user-friendly approach was suggested by
the latest Rails 2.3.4, and a conversation with Sam Ruby
(who suggested some improvements).

Now, instead of complaining, we remove the offending bytes,
leaving a well-formed utf-8 string, which we pretend is what
the user meant to submit.
2009-09-07 16:02:36 -05:00
Jacques Distler 8cf26c9249 Add a "Create New Page" Link to the Search Page
Based on an idea by nowa:

   bcac6c9f94
2009-08-12 12:19:23 -05:00
Jacques Distler 664552ac02 Rails 2.3.3.1
Update to latest Rails.
A little bit of jiggery-pokery is involved, since they
neglected to re-include vendored Rack in this release.
2009-08-04 10:16:03 -05:00
Jacques Distler 329fafafce Fix Two bugs from Toby Bartels
1. Ensure that "rollback" respects locked pages.
2. Expire revisions of an edited page. Use a before_save
   hook to deal with the situation where a page's name
   has been changed.
2009-08-04 00:02:04 -05:00
Jacques Distler 0e0f666fb4 Rollbacks and Relative URLs
Ensure "rollback" locks page for editing. (reported by Toby Bartels)
Generate relative URLs, when possible. (Patch by Dennis Knauf)
2009-07-27 22:49:12 -05:00
Jacques Distler 155dc88891 Uploaded files in published webs should be accessible
File retrieval (but not file uploads) should be allowed on
a published web (this includes BlahTeX/PNG support).
(Reported by Ari Stern).
2009-06-17 11:17:25 -05:00
Jacques Distler 305b37b401 Another Bug-fix and some tests
Man, but this needs more tests ... !
2009-06-06 21:08:08 -05:00
Jacques Distler d7832ba262 Wiki Redirects and Page Renaming
Added the ability to rename existing pages.
[[!redirects Some Page Name]] redirects Wikilinks [[Some Page Name]] to
  the current page (assuming "Some Page Name" does not exist).
  Real pages trump redirects (though this may change, depending on 
  user feedback).
2009-06-02 22:17:15 -05:00
Jacques Distler c85ce458ce Update for itex2MML 1.38
Add support, in the LaTeX export, for blackboard bold
digits and lowercase latin letters. If these are
present, LaTeX will
   \usepackage{mathbbol}
N.B.: this uses the stmaryrd font for blackboard bold
letters, instead of the msbm font.
Tests included. (Yes, you need to update itex2MML as well.)
2009-03-24 22:37:58 -05:00
Jacques Distler e2ccdfd812 Instiki 0.16.5
Update to Rails 2.3.2 (the stable Rails 2.3 release).
Add audio/speex support
Update CHANGELOG
Bump version number
2009-03-16 09:55:30 -05:00
Jacques Distler 79be69c910 Update Tests for Latest itex2MML
In particular, we (going forward) will have a unit test which
will determine whether the latest itex2MML is installed.
2009-03-08 23:29:06 -05:00
Jacques Distler 13d096c688 Set X-Sendfile Header Only for Local Proxy Requests
If the request.remote_addr is not LOCALHOST, don't set the
X-Sendfile header.
2009-03-05 12:14:03 -06:00
Jacques Distler d8a2a3657d Tests
Add tests for x-sendfile, <audio> and <video> support.
2009-03-03 22:27:26 -06:00
Jacques Distler 7f2b16e78d File Upload Fixes
Dunno why this was buggered again. ":back" doesn't seem to function as it used to.
Also, when uploading a file from page "foo", it's important to return to "foo" after
a successful upload, rather than redirecting to the HomePage.

Finally, a favicon tweak.
2009-02-18 01:40:11 -06:00
Jacques Distler 4e14ccc74d Instiki 0.16.3: Rails 2.3.0
Instiki now runs on the Rails 2.3.0 Candidate Release.
Among other improvements, this means that it now 
automagically selects between WEBrick and Mongrel.

Just run

    ./instiki --daemon
2009-02-04 14:26:08 -06:00
Jacques Distler 43aadecc99 Links in Published Webs
Links in the 'show' action should be to the 'show' action.
Links in the 'published' action should be to the 'published' action.
Try to focus, Distler!
2009-02-01 16:17:14 -06:00
Jacques Distler b4b1dde8fd Update Tests
Functional Test for the new behaviour of Revisions 344-345.
2009-01-26 08:57:13 -06:00
Jacques Distler 5d15e3f39d Security: Instiki 0.16.2
On Webs with file uploads enabled, uploaded files were stored
(in version 0.16.1 and earlier) in the public/ directory.

This was a security threat. A miscreant could upload a .html file.
When a user clicked on the link to the file, it was opened (unsanitized)
in the browser.

As of version 0.16.2, uploaded files are stored in the webs/
directory. Now, when the user clicks on the link, the file is sent
with the

    Content-Disposition: attachment

header set, which causes the file to be downloaded, rather than opened
in the browser. As always, files downloaded from the internets should be
treated with caution. At least, this way, they are not aoutomatically 
opened in the browser.

To move your existing uploaded files to the new location, do a

     rake upgrade_instiki
2009-01-26 00:21:30 -06:00
Jacques Distler 0b2a6935a2 Export XHTML Pages
When a Web uses one of the Markdown Text Filters, and you export
all the pages as a zip file, you'd like the MathML and SVG to
render when the pages are viewed locally. This means saving them
with a .xhtml extension. Users of non-XHTML-capable browsers or
Textile users should still get .html files.
2009-01-23 11:02:16 -06:00
Jacques Distler a6d80426a9 Revert Revision 338
That didn't work with nested includes:
A: [[!include B]]
B: [[!include C]]
C:   fubar!

Added a test for that issue.
2009-01-15 22:42:09 -06:00
Jacques Distler 1192f70f44 @import In Published View
In the Stylesheet Tweaks, the owner of a Web can specify an @import rule
to pull in CSS styles form an external file. This worked in the "show"
view, but was broken in the "published" view.

Fixed.

Also, update a functional test to match Revision 313.
2008-12-22 12:19:18 -06:00
Jacques Distler 8373befa0b Tests for Recursive Include Fix 2008-12-21 13:31:59 -06:00
Jacques Distler 7828d79d35 Password Mismatch
When setting a password for a Web (on the "Edit Web" page),
ensure that the password matches. Previously, the "verify"
field was a placebo.
2008-12-20 17:54:54 -06:00
Jacques Distler 1f816af24b Uploaded Pictures Should Display in "Published" Mode 2008-12-20 13:56:50 -06:00
Jacques Distler 8eb59105ea Fix a Functional Test
For inexplicable reasons, this test passes on my system, even though (as
previously written) it shouldn't. Fixed now.
2008-12-17 14:11:14 -06:00
Jacques Distler f842013243 Require required?
At least on some systems (not mine), it seems to be.
2008-12-17 10:38:34 -06:00
Jacques Distler 05b76f7625 Philip Taylor Freakout Edition
Doubtless, he would have been fleetingly ecstatic.
Alas, he a) probably doesn't subscribe to the bzr feed,
and b) is probably asleep at the moment.
2008-12-17 01:42:24 -06:00
Jacques Distler 5d2b0da4d5 Faster
Update dnsbl_check plugin to latest version.
Update Maruku to latest version.
In the wiki_controller, only apply the dnsbl_check before_filter 
  to the :edit, :new, and :save actions, instead of all actions.
  This makes mundane "show" requests faster, but does not 
  compromise spam-fighting ability.
2008-12-16 00:40:30 -06:00
Jacques Distler 34fcd7943a Some Tests
Some functional tests for 'delete orphaned pages by category'.
2008-12-07 00:24:25 -06:00
Jacques Distler 1b69b148de More Ruby 1.9 Compatibility fixes
Still a long way to go, but these will help.
2008-11-12 09:47:24 -06:00