Hi,
I've been trying to replace \ with / as a user macro so that users can paste in links to windows file paths and have them function when you click on them.
I've tried $param.filePath.replace("\", "/") and replaceAll and \\ and \\\ and \\\\.
Page displays an error and the logs say: ParseErrorException: Encountered "file" at getRenderedContent[line 0, colum 10]"
If I try $param.filePath.replace("A", "B") that works fine.
Anyone got any suggestions?
Cheers
I found a solution.
#set($slash = '\')
#set($replaced = $paramFilePath.replace($slash, "/"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.