Good evening

Thanks a lot for this great Module!
I've found a small bug: If a user enters a special character in one of the Metadata-Form-Fields, e.g.:
ftitle: Tom's Test
then it will be displayed as:
Tom&#039\;s Test
(Without the \)

I assume that's no big problem...

Kind regards,
Thomas

Comments

robmilne’s picture

You can do the following to remedy your problem:

Replace line 431 of webfm.module:

    $href = array('data' => l('<img src="'.$icon_path.'" alt="[file]" title="download as file"/>&nbsp;', 'webfm_send/'.$file->id.'/1', '', '' , '' , '', TRUE).l(check_plain($file->ftitle ? $file->ftitle : $file->n), 'webfm_send/'.$file->id));

with this:

    $href = array('data' => l('<img src="'.$icon_path.'" alt="[file]" title="download as file"/>&nbsp;', 'webfm_send/'.$file->id.'/1', '', '' , '' , '', TRUE).l($file->ftitle ? $file->ftitle : $file->n, 'webfm_send/'.$file->id));

Since there is zero security risk here (the name isn't referenced by the link - the fid is) I'll remove the 'check_plain' in subsequent revs.

schittli’s picture

Good evening
Thank you very much for your fast answer & solution!
It always looks like a miracle if mixed php & html works...
Kind regard,
thomas

robmilne’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)