Ticket #2 (closed enhancement: fixed)
Grabcode handler
| Reported by: | dartar | Owned by: | DarTar |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.6.2 |
| Component: | formatters | Version: | 1.1.6.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by DarTar) (diff)
If time/effort allows, I'd like to see this one: it's already proved to be a "selling point". Stylesheet rules need to be improved though. --JW
http://wikkawiki.org/GrabCodeHandler
[migrated from http://wikkawiki.org/AdminDevelopmentDiscussions]
Updates
The code committed to the repository as of [49], [50] and [51] adds a further option to the code block syntax, allowing users to specify a filename for the code block, e.g.:
%%(php;22;myfile.php) ... %%
If a file name (like myfile.php) is specified:
- a code block header is generated with the filename;
- the filename is added to the title of the grab button;
- the filename is posted as through a form hidden field so it can be used as a name for the file generated by the grabcode handler.
A (configurable) extension (default: .txt) is appended to the filename by the grabcode handler to prevent the browser from directly running potential malicious code on download.