Commit Graph

2841 Commits (b752c645f8ed6e1708300ff62e7d6c3d3c6efd26)

Author SHA1 Message Date
Joey Hess 8c9c3915ec Fix base url when previewing. Was broken by urlto changes in last release.
Added a showform_preview that is like showform, but sets forcebaseurl
to point to the page being previewed.
2011-01-05 13:50:42 -04:00
Giuseppe Bilotta 5365a72e42 unescape tag names
Since tag names are now retrieved from the file names, we must revert
the escaping process that santizes the file names. Solve by adding a
`pagetitle()` call at the end of the tagname()
(cherry picked from commit 0ee0612b1ab11d76eb3790c8db7a2ba992c54f6b)
2011-01-05 12:06:36 -04:00
Joey Hess 1b1b3927ee fix patch to not strip a leading "." unless it's part of a path
For correctness only, since a tag named ".foo" is very unlikely.
2011-01-04 15:59:28 -04:00
Joey Hess fc6c0e8b5b fix patch to not expose config setting as a regexp 2011-01-04 15:59:00 -04:00
Giuseppe Bilotta a17469e388 tag name sanitation
The use of typed links for tags and some of the consequent changes
introduced some unwanted functionality variations in the tag system. Two
problems in particular could be observed, when compared to the use of
tags in older versions of IkiWiki:

* tags in feeds (both rss and atom) would use the file path as their
  name (e.g. you would have <category term="tags/sometag" /> in an atom
  item for a page tagged sometag with a tagbase of tags), whereas they
  appeared pure before
* tags containing a slash character would appear without the slash
  character but be used with the slash character in other circumstances
  (effect visible by tagging a page with a name such as "with/slash")

Both of these issues are fixed by introducing a tagname() function that
takes a tag link and effectively reverses (as well as possible) the
effects of taglink().

A possible alternative route would have been the reintroduction of the
global %tags hash, but the new approach as the (arguable) benefit of
introducing a small layer of sanitation for tag names.
2011-01-04 15:58:42 -04:00
Joey Hess 69b9fd132d remove second parameter to include_javascript
function used to take a second parameter to control absoluteness, no longer
does
2011-01-02 18:33:05 -04:00
Joey Hess 7d0ef85d80 git: Fix bug involving attempting to web revert a commit that included changes to attachments. 2010-12-29 20:19:58 -04:00
Joey Hess 8517aa8687 bugfix 2010-12-29 20:10:28 -04:00
Joey Hess 4fb26f4e60 Add a second parameter to the rcs_diff hook, and avoid bloating memory reading in enormous commits. 2010-12-29 19:58:49 -04:00
David Bremner ab511bb39c Update highlight plugin for highlight api.
Note that in particular calling initTheme with and empty file does not
work anymore.

use of initLanguage was replaced by loadLanguage, which seems to work
in both places.

I tried to make it a bit more robust against missing a highlight package.
There are lots of warnings, but it no longer crashes.
2010-12-29 13:05:20 -04:00
Thomas Keller 6379737970 monotone.pm: while we're still only checking the major and minor
part of the version number of the monotone binary, we do not want
to give false alarm on patch or development versions
2010-12-28 01:55:12 +01:00
Paul Menzel 68e333e0bd teximg: Use `\[` and `\]` instead of not recommended `$$`.
It is not recommended to use the double dollar symbol `$$` to set displayed math [1][2].

[1] http://en.wikibooks.org/wiki/LaTeX/Mathematics
[2] http://www.math.uiuc.edu/~hildebr/tex/displays.html

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2010-12-26 14:46:29 -04:00
Joey Hess 326c4d6af2 use CGI->url to get current absolute cgi url for openid login process 2010-12-25 15:08:22 -04:00
Joey Hess 93d7368a32 revert cgiurl change that broke openid login 2010-12-25 14:23:55 -04:00
Joey Hess beae7ef9db editpage, comment: Clean up title when editing or creating a page or comment.
Now that page.tmpl is used for cgi, the parentlinks are able to be
displayed even when creating or editing a page. So it's redundant to
include the path to the page in the title, remove it.
2010-12-25 13:38:26 -04:00
Joey Hess 9741a3f979 inline: Force an absolute page location when the inline postform is used.
There seems no need to allow selecting a location when creating a page this
way; the user should always want it to appear in the inline whose form they
submitted.
2010-12-25 13:32:57 -04:00
Joey Hess 80e3f7c309 indent 2010-12-25 13:23:23 -04:00
Joey Hess fd95afe8ea fix comment 2010-12-25 13:12:21 -04:00
intrigeri 406485917a po: do not override homepage title when it was overridden. 2010-12-22 17:33:57 +01:00
intrigeri 74055be78f po plugin: update injected urlto signature.
The lack of $from will probably hurt setups using po_link_to = current,
but at least we can fix the blocker bug that prevents any wiki using the po
plugin to build.
2010-12-20 14:36:21 +01:00
Giuseppe Bilotta bb8f76a4a0 inline: base feed names on the included page name
Use the included page name rather than the including page name. This
allows us to allow feeds in nested inlines without duplicating feeds
with the same content under different (and stupid) names.
2010-12-05 16:34:11 -04:00
Joey Hess aa65300c2f meta: Fix calling of htmlscrubber to pass the page parameter. The change of the htmlscrubber to look at page rather than destpage caused htmlscrubber_skip to not work for meta directives. 2010-12-01 20:25:05 -04:00
Joey Hess 3697a684df Merge remote branch 'smcv/ready/sslcookie-auto' 2010-11-29 16:31:25 -04:00
Simon McVittie f33c2af2c4 Always set secure cookies if logging in via HTTPS 2010-11-29 19:30:44 +00:00
Joey Hess 1182e9d0ee use one-parameter form of urlto 2010-11-29 15:07:26 -04:00
Joey Hess 0ae1e4cc0e Merge remote branch 'smcv/ready/localurl' 2010-11-29 14:43:57 -04:00
Joey Hess 170cb02479 git: Avoid adding files when committing, so as not to implicitly add files like recentchanges files that are not normally checked in, when fixing links after rename. 2010-11-29 13:42:03 -04:00
Joey Hess a5120846cb rename: Fix to pass named parameters to rcs_commit 2010-11-29 13:28:28 -04:00
Joey Hess 78a22e2eb2 git: Fix temp file location. 2010-11-29 12:01:50 -04:00
Simon McVittie 18bb93f574 pinger: avoid pinging our own local path, too 2010-11-23 23:14:38 +00:00
Simon McVittie 2411e2be1f Use local path for even more CGI URLs 2010-11-23 23:12:21 +00:00
Simon McVittie 4625e0c4d9 Pass a CGIURL into commentmoderation.tmpl
Omitting this resulted <form action=""> which is in fact a working
self-referential form, but is less obvious than it ought to be.
2010-11-23 00:20:57 +00:00
Simon McVittie 1f019ac2aa Use local paths for most references to pages 2010-11-23 00:19:10 +00:00
Simon McVittie 296e5cb2fd Use local paths for the CGI URL 2010-11-23 00:12:17 +00:00
Simon McVittie 78c595736e Use local paths when including Javascript 2010-11-23 00:06:07 +00:00
Simon McVittie d2e3741a6f Use local paths for redirection where possible 2010-11-23 00:00:11 +00:00
Joey Hess 31f0e459b8 edittemplate: Fix crash if using a .tmpl file or other non-page file as a template for a new page. 2010-11-20 14:54:43 -04:00
Joey Hess af5f162ca7 highlight: Support new format of filetypes.conf used by version 3.2 of the highlight package. 2010-11-20 12:55:26 -04:00
Simon McVittie 55515050e1 make use of precompiled regex objects 2010-11-20 00:02:49 +00:00
Joey Hess b00c6c9640 inline: Improve RSS url munging to use a proper html parser
and support all elements that HTML::Tagset knows about.

(Which doesn't include html5 just yet, but then the old version didn't either.)

Bonus: 4 times faster than old regexp method.
2010-11-16 16:57:50 -04:00
Joey Hess c502b8fe54 indentation 2010-11-16 15:40:16 -04:00
Joey Hess cedf2c0af5 Fix escaping of filenames in historyurl. (Thanks, aj) 2010-11-16 15:12:52 -04:00
Joey Hess ec6c1269d2 more: Add pages parameter to limit where the more is displayed. (thanks, dark) 2010-11-16 15:00:04 -04:00
Joey Hess b85ca8603a websetup: Fix encoding problem when restoring old setup file. 2010-11-16 14:24:15 -04:00
Joey Hess d8de98911e comments: Make comment() pagespec also match comments that are being posted. 2010-11-12 00:36:03 -04:00
Joey Hess 78de33d2ea comments: Make postcomment() pagespec work when previewing a comment. 2010-11-12 00:28:27 -04:00
Joey Hess 289b30a47d Fix htmlscrubber_skip to be matched on the source page, not the page it is inlined into. Should allow setting to "* and !comment(*)" to scrub comments, but leave your blog posts unscrubbed, etc. 2010-11-12 00:00:54 -04:00
Tuomas Jormola d32a1028ab Use author date instead of commit date
Signed-off-by: Tuomas Jormola <tj@solitudo.net>
2010-10-31 16:06:25 -04:00
Craig Lennox cf2e3cb7d9 Added missing registration of checkconfig hook. 2010-10-31 10:12:01 -04:00
Tuomas Jormola 4573524196 Added missing hook registration for checkconfig
Signed-off-by: Tuomas Jormola <tj@solitudo.net>
2010-10-30 22:02:30 -04:00
Joey Hess ac6b5c12fa squash undef 2010-10-25 23:31:41 -04:00
Joey Hess ac8aad2eca remove a last that won't work 2010-10-25 23:03:28 -04:00
Joey Hess 5c6eb167b8 highlight: Ensure that other, more-specific format plugins, like txt are used in preference to this one in case of ties. 2010-10-25 23:00:32 -04:00
Joey Hess 2076ed597c txt: Fix display when used inside a format directive.
txt's use of a format hook can't work in that case, so it needs to use a
htmlizeformat hook in this case to handle wrapping the text in pre tags.
2010-10-25 22:37:34 -04:00
Joey Hess 5db2d6f6b2 nice message if someone tries to revert a merge commit 2010-10-23 17:19:48 -04:00
Joey Hess 62a0f2f3d6 bugfix 2010-10-23 16:31:58 -04:00
Joey Hess 9ca9959eda fix web reversion when the srcdir is in a subdir of the git repo. 2010-10-23 16:19:16 -04:00
Joey Hess 1c5a3f2c67 Fix typo that broke anonymous git push. 2010-10-23 15:25:29 -04:00
Joey Hess 9b832df0d2 add a missing chomp 2010-10-19 21:38:34 -04:00
Joey Hess 8555d10f63 img: If a class is specified, don't also put the img in the img class. 2010-10-13 12:57:16 -04:00
Joey Hess 7ba0f7d297 monotone: Fix recentchanges page when the srcdir is not at the top of the monotone workspace. Thanks, tommyd. 2010-10-11 20:30:14 -04:00
Joey Hess cfbd272c8b websetup: Fix defaults of checkboxes in advanced mode.
So formbuilder has an annoying glitch, that setting the value of a
checkbox, even without force, will override the value currently on the
form. Thus the guards against changing checkbox values when a form has been
submitted.

But those guards also prevented the checkboxes for advanced items getting
the right value when going into advanced mode.

Note that if the user makes changes to advanced mode stuff and leaves
advanced mode, those changes are lost. That seems reasonable so I didn't
change it -- and it made this fix simple.
2010-10-11 11:41:34 -04:00
Joey Hess 274219ecc8 websetup: Fix saving of advanced mode changes.
The showadvanced field was not known to formbuilder when hitting the save
changes button.
2010-10-11 11:12:41 -04:00
Joey Hess 9aa9604c36 add blank line 2010-10-08 19:26:31 -04:00
Joey Hess 7d5ac1cdd9 typo 2010-10-08 19:25:35 -04:00
Joey Hess 7e9ca590c7 add message field to revert form 2010-10-08 19:19:43 -04:00
Joey Hess fb4ee927a0 propigate rcs_revert error message
and misc reorg
2010-10-08 18:59:04 -04:00
Joey Hess 4efc1f22d4 taint handling for rev 2010-10-08 18:58:47 -04:00
Joey Hess c430792148 refactor 2010-10-08 18:50:24 -04:00
Joey Hess e7d6dcfed6 remove todo item
I understand the need to avoid chdir when running git_parse_changes
for receive now. At that point, the changes have not been pushed to
the srcdir's repo yet. When running the same code for preprevert,
chdir to the srcdir is ok, and necessary.
2010-10-08 18:46:30 -04:00
Joey Hess faf94b5787 refactor check_canchange into IkiWiki library 2010-10-08 18:09:28 -04:00
Joey Hess 5c6f7a8d1b fix rcs_prepedit implementation to match spec 2010-10-08 18:02:47 -04:00
Joey Hess 84111d96c4 make revert hooks optional
I removed the IkiWiki::rcs_ stubs for the revert hooks. Instead
recentchanges tests to see if the hooks are available and calls
them directly.
2010-10-08 17:54:12 -04:00
Joey Hess 238e8b95a5 convert rcs_revert to only stage the reversion 2010-10-06 15:08:12 -04:00
Joey Hess 58a0698d92 return to recentchanges page on form cancel 2010-10-06 15:02:06 -04:00
Joey Hess d4fd8cd67d put diff at end of revert form 2010-10-06 15:00:48 -04:00
Joey Hess 237ea79d71 remove rcs_showpatch 2010-10-06 14:39:10 -04:00
Joey Hess fe582418d2 remove debugging dumper code 2010-10-04 16:56:21 -04:00
Joey Hess 3dce3cc1be indentation and layout 2010-10-04 16:56:04 -04:00
Joey Hess 80da2b2840 fix $git_root caching 2010-10-04 16:35:17 -04:00
Joey Hess f025923d14 fix indentation 2010-10-04 16:33:36 -04:00
Joey Hess 3f3aab3793 document new rcs reversion support functions 2010-10-04 16:22:50 -04:00
Joey Hess 68670cad82 indentation 2010-10-04 16:03:00 -04:00
Joey Hess 49ef98505a fix bug if git_root is "0" 2010-10-04 16:01:21 -04:00
Joey Hess 252e3f6006 Merge remote branch 'remotes/peteg/revert' into revert 2010-10-04 15:59:45 -04:00
Joey Hess bd48ff734a fixups tidy change
Need checkconfig hook; examples don't become default values.
2010-10-02 12:02:34 -04:00
Peter Gammie 7d1c3aa1cb Minor tidy-ups. 2010-10-01 14:08:07 +10:00
Peter Gammie 8024a2636f Complete rcs_preprevert and lightly test. 2010-10-01 14:06:00 +10:00
W. Trevor King 408ee89fd7 Make tidy command line configurable for the htmltidy plugin. 2010-09-30 08:09:29 -04:00
Peter Gammie 941755e466 Get things right after moving to a branch. 2010-09-29 15:43:44 +10:00
Peter Gammie acecbad0ff First cut at the revert plugin. 2010-09-29 15:14:19 +10:00
Joey Hess e22b18aabc template_depends: throw nice error message when template cannot be found
plovs reported a crash when templates were not installed properly,
with a non-useful error about the template object not being defined.
I've audited all uses of template_depends(), and template(), and it makes
sense for them to throw an error if the template cannot be found. All code
with a user-supplied template catches errors already, to handle template
parse failures.

It did not make sense for template_file to throw errors, as some code uses
it to probe if a template file is available.
2010-09-27 15:58:01 -04:00
Joey Hess 00595b62be avoid fatal error if aggregate page template could not be found
That template is user-controlled.
2010-09-27 15:44:04 -04:00
Joey Hess 1334695f4c Merge remote branch 'remotes/smcv/ready/htmlbalance' 2010-09-26 22:44:52 -04:00
Joey Hess 1883e31de2 Propigate PATH into wrapper.
In the last version, the ikiwiki script stopped setting PATH.
But that leads to gcc failing when run from websetup. See
http://www.branchable.com/bugs/Crashes_when_rebuilding_wiki_after_setup_change/
2010-09-26 22:27:46 -04:00
Simon McVittie 5876968fa1 htmlbalance: be compatible with HTML::Tree 4.0
The HTML::Tree changelog says:

    [THINGS THAT MAY BREAK YOUR CODE OR TESTS]
    ...
    * Attribute names are now validated in as_XML and invalid names will
      cause an error.

and indeed the regression tests do get an error.
2010-09-26 22:33:54 +01:00
Joey Hess 90bc68589e attachment: Fix attachment file size display. 2010-09-21 15:33:42 -04:00
Joey Hess 8063b960ad meta: Ensure that the url specified by xrds-location is absolute.
With a relative xrds-location, the openid perl client module will fail.
I haven't checked the specs to see if it needs to be absolute, but all
examples I've seen are absolute, so it seems a very good idea.
2010-09-19 20:15:34 -04:00
Joey Hess 2ca4ff8ae6 add missing space 2010-09-19 20:04:31 -04:00
Joey Hess 884835ce1c cutpaste: Fix bug that occured in some cases involving inlines when text was pasted on a page before being cut. 2010-09-15 16:24:50 -04:00