You are here: Foswiki>Tasks Web>Item5113 (06 Jan 2015, GeorgeClark)Edit Attach

Item5113: File urls no longer translate 2 slashes to 5

pencil
Priority: Enhancement
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiRender, UrlHandling
Branches:
Reported By: TWiki:Main.PamelaDuffy
Waiting For:
Last Change By: GeorgeClark
Links to locally available machines used to be automatically translated from file://amachine to file://///amachine

This makes firefox work with locallinks plugins allowing intranet links to internal windows shares to work.

Without this ability my intranet TWiki will die which would be very upsetting.

I have previously added this code into Render.pm

lib/TWiki/Render.pm:

# Firefox implements URIs properly which means it
# wants file:///// for links to local files.
# People however want to write file:// and IE lets both
# work so this encourages people in their bad behaviour.
# Note that this needs a user.js on Firefox to allow the
# link to succeed.
$url =~ s%file://([^/]*)%file://///$1%g;

This was in the sub external_link just above the #SMELL comment (which is still there in the beta I am running).

-- TWiki:Main/PamelaDuffy - 11 Dec 2007

I have done a test at TWiki:Sandbox.TestTwoOrFiveFileLinkSlashes - no rewriting takes place.

This is not something that was previously in TWiki released code, but a useful enhancement.

Any thoughts on other browsers / risks?

Degrading to enhancement.

-- TWiki:Main.SteffenPoulsen - 12 Dec 2007

ItemTemplate edit

Summary File urls no longer translate 2 slashes to 5
ReportedBy TWiki:Main.PamelaDuffy
Codebase
SVN Range TWiki-4.2.0-beta3, Thu, 01 Nov 2007, build 15452, Plugin API version 1.2
AppliesTo Engine
Component FoswikiRender, UrlHandling
Priority Enhancement
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r4 - 06 Jan 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy