Wiki source code of scripttest
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% class="jumbotron" %) | ||
2 | ((( | ||
3 | (% class="container" %) | ||
4 | ((( | ||
5 | = Attachment Rename Script Test Page = | ||
6 | |||
7 | This page is used to test all known edge cases for attachment renaming and broken reference recovery. | ||
8 | |||
9 | == โ Working Link with Bad Filename == | ||
10 | This should show a valid image but with a bad filename like `a b.jpg`, which will be renamed to `a_b.jpg`. | ||
11 | {{velocity}} | ||
12 | <img src="$doc.getAttachmentURL('a b.jpg')" width="300" /> | ||
13 | {{/velocity}} | ||
14 | |||
15 | == ๐งผ Already-clean filename == | ||
16 | [[image:already_clean.jpg]] | ||
17 | |||
18 | == ๐ฅ Broken reference (does not exist at all) == | ||
19 | [[image:nonexistent[broken].jpg]] | ||
20 | |||
21 | == ๐ Previously renamed (should be fixed if stale) == | ||
22 | {{velocity}} | ||
23 | <img src="$doc.getAttachmentURL('bad name.jpg')" width="250" /> | ||
24 | {{/velocity}} | ||
25 | |||
26 | == ๐ง Fuzzy-match candidate (actual file is `a_b.jpg`) == | ||
27 | [[image:a b.jpg]] | ||
28 | |||
29 | == ๐งช Badly-encoded filename with leftover macro syntax == | ||
30 | [[image:blacks_counted_as_white_injustice_ethnicity_image_images_non-hispanic_race_texas_white.jpg].jpg]] | ||
31 | |||
32 | == ๐งฑ HTML Embed (should still work after rename) == | ||
33 | {{velocity}} | ||
34 | <img src="$doc.getAttachmentURL('a b.jpg')" width="200" /> | ||
35 | {{/velocity}} | ||
36 | |||
37 | == โ๏ธ Velocity-based Embed with bad name == | ||
38 | {{velocity}} | ||
39 | <img src="$doc.getAttachmentURL('bad name.jpg')" width="200" /> | ||
40 | {{/velocity}} | ||
41 | |||
42 | == ๐ Embedded MP4 (should be renamed and still playable) == | ||
43 | {{video attachment="bad video.mp4"/}} | ||
44 | |||
45 | == ๐ Gallery Rendering == | ||
46 | {{gallery columns="3"}} | ||
47 | image:a b.jpg | ||
48 | image:already_clean.jpg | ||
49 | image:comparison.png | ||
50 | image:1000000503.jpg | ||
51 | {{/gallery}} | ||
52 | |||
53 | == ๐ Attachment Reference == | ||
54 | [[Archived Chart>>attach:comparison.png]] | ||
55 | |||
56 | {{putFootnotes/}} | ||
57 | ))) | ||
58 | ))) |