0 Votes

Wiki source code of scripttest

Last modified by Ryan C on 2025/05/06 20:38

Show last authors
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 )))