01470: images containing "[" in url are NOT displayed

Summary: images containing "[" in url are NOT displayed
Created: 2021-09-21 12:45
Status: Closed - not a bug
Category: Bug
From: aaa?
Priority: 3
Version: 2.2.142
OS: php 7.4

Description: this is not working: http://wd2021.atwebpages.com/ih/di/UPUD/ImxbzVJ[1].png

image is not displayed at a page. it gives this result: https://imgur.com/saAdbFN aaa? September 21, 2021, at 12:46 PM

Sorry, when you have special characters in links, you need to either escape them to their percent-encoded values or wrap them with the escape sequence "[=code=]", see below:

* The file name is "pmwiki[1].png"
* https://www.pmwiki.org/pmwiki/uploads/PITS/pmwiki%5b1%5d.png
* https://www.pmwiki.org/pmwiki/uploads/PITS/pmwiki[=[1]=].png
  • The file name is "pmwiki[1].png"

This is consistent with the standard, see RFC:1738 where it is explicitly written [Page 3]: "Other characters are unsafe because gateways and other transport agents are known to sometimes modify such characters. These characters are "{", "}", "|", "\", "^", "~", "[", "]", and "`". All unsafe characters must always be encoded within a URL." PmWiki is following the standard, and browsers, by displaying the unsafe characters in their URL bar, and by allowing you to copy them unescaped, are not. --Petko September 21, 2021, at 01:25 PM

See also: Cookbook:FixURL on how to enable a GUI toolbar button to help you encode these characters. --Petko September 21, 2021, at 01:31 PM