• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5736: localization bug in $fileUrl from AttachmentListPlugin

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension AttachmentListPlugin Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Hi all, I found a little problem in the AttachmentListPlugin:

Our organization write in Portuguese and some files has non english letters like "", "", "",...

I use $fileUrl to make a refer for files with this plugin, and the name is bed for the URL. The localized names must be scaped to work on the browser.

I correct the bug with this changes in AttachmentListPlugin.pm:

300,301c300,306
<         my $fileUrl =
<           $pubUrl . "/$attachmentTopicWeb/$attachmentTopic/$filename";
---
>         my $webEnc   =  $attachmentTopicWeb;
>            $webEnc   =~ s/([^-_.a-zA-Z0-9])/sprintf("%%%02x",ord($1))/eg;
>         my $topicEnc =  $attachmentTopic;
>            $topicEnc =~ s/([^-_.a-zA-Z0-9])/sprintf("%%%02x",ord($1))/eg;
>         my $fileEnc  =  $filename;
>            $fileEnc  =~ s/([^-_.a-zA-Z0-9])/sprintf("%%%02x",ord($1))/eg;
>         my $fileUrl  = "$pubUrl/$webEnc/$topicEnc/$fileEnc";

-- TWiki:Main/AurelioAHeckert - 27 Jun 2008

Removing temp debug texts.

-- AC - 28 Jul 2008

ItemTemplate
Summary localization bug in $fileUrl from AttachmentListPlugin
ReportedBy TWiki:Main.AurelioAHeckert
Codebase

SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Extension
Component AttachmentListPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:17146 TWikirev:17172
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-07-28 - ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback