Menu

Trac Commit Log


Commit Date  
[r3124] by cboos

Refactoring of the Mimeview HTML Preview.

The actual content to be previewed is only retrieved and eventually
converted to unicode when it's required.
For example, when previewing images, the content of the image will not
be read anymore, only the url will be used.

In the various `render` methods, the `content` data might be a `str`
object, an `unicode` object, or an object that can be `read` to obtain
one of the former.

I did a lot of documentation updates in order to make this clear.
Under normal circumstances, `IHTMLPreviewRenderer`s will receive
a `str` object when they deal with data coming from the repository
or from attachment files, and they'll receive an `unicode` object
when they receive data from Wiki "code" blocks.

The name of the 4^th^ argument of the `Mimeview.render` method was
changed to be an `url` instead of a `detail` or `rev`.
This decouples the `mimeview` library from the `versioncontrol` library.

2006-04-10 20:54:53 Tree
[r3123] by cboos

Follow-up to r3118: The `repository_dir` should be translated back to UTF-8 before being handed down to SVN. Should fix #3012.

2006-04-10 18:02:35 Tree
[r3122] by cboos

The `ticket:` wiki syntax now correctly handles non-numeric ids as missing links.

Closes #3011 and adds unit-tests, which can also be used as
regression tests for #2986.

This changeset make it easy to add unit-tests in a module
which implements custom wiki syntax by the way of the
`IWikiSyntaxProvider` interface.

2006-04-10 15:23:22 Tree
[r3121] by cmlenz

Remove variable from report comment, which was causing #2894.

2006-04-10 14:30:53 Tree
[r3120] by cmlenz

Ported [3119] to 0.9-stable (fixing #2531).

2006-04-10 14:27:35 Tree
[r3119] by cmlenz

Remove handling of `X_FORWARDED_HOST` header. Should fix #2531 and similar problems with SSL-proxy setups.

2006-04-10 14:26:29 Tree
[r3118] by cboos

More unicode tweaks:

* if no encoding was specified, `Request.write` will encode an unicode string using ''utf-8'' instead of ''ascii''
* the `trac.util.to_unicode` function is now "smarter": when the optional `charset` parameter is not given, it will first try to convert from ''utf-8'', then from the locale preferred encoding. In any case, the conversion '''will''' succeed, if necessery using either replacement characters or a '1-to-1' encoding, depending on the value of the `lossy` optional parameter.
* unit tests for the `to_unicode` function have been added
* deprecate the `trac.util.to_utf8` utility function, which is not used anymore
* the TracIni configuration file is converted to `unicode`. Should fix #2972.

2006-04-10 11:28:12 Tree
[r3117] by cboos

The TracBrowser now uses the `[browser] downloadable_paths` configuration option to selectively enable Zip downloading of the specified paths.

2006-04-10 10:59:05 Tree
[r3116] by cboos

Typo fixed, closes #3001.

2006-04-08 21:06:07 Tree
[r3115] by otavio

tagging version 0.9.4-3

2006-04-08 11:53:33 Tree
Older >
MongoDB Logo MongoDB