rejetto forum
Software => HFS ~ HTTP File Server => Bug reports => Topic started by: raybob on October 24, 2012, 02:38:46 AM
-
It appears to me that this fails to correctly load file names that have apostrophes ( ' ) in them...
-
Can anybody fix this? I really can't figure it out and this is a pretty major bug...
-
I fixed it and it has nothing to do with the javascript :)
In the selector checkbox, the value='' field will generate invalid html if the filename contains an apostrophe. Sometimes it would turn out something like this which is invalid html:
<input type='checkbox' class='selector' name='selection' value='file with an apostrophe'.txt' {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} />
-
i will change the single quote in double quote, for that and for this other line
<li> <a href="%item-url%">%item-name%</a>
thanks for reporting
-
That'll cause the same problem though, if the filename contains a "
This is what I did.
value="{.replace|"|%22|%item-name%.}"
-
wait a minute, you are cheating me!
the default template doesn't use %item-name% in that place, but %item-url% (that's already encoded).
The bug is in your custom template.
-
Haha ok then :D
I didn't realize %item-url% was encoded but the name wasn't, I just assumed they both weren't.