Item11345: Make copying of external resources (images) optional

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: PublishPlugin
Branches: trunk
Reported By: DiabJerius
Waiting For:
Last Change By: CrawfordCurrie
I need to retain external links in the HTML rendering of the Wiki pages. As I read the code, there are currently two places where copying of internal resources is done:

  1. In Publisher::_copyResource, when examining CSS files
  2. In Publisher::_handleURL, which is called once, when dealing with <img> tags

The first instance is accidental (I believe) and doesn't really help much as the CSS itself would need to be rewritten to take advantage of the local version of the resource. Item10597 provides a patch which removes this behavior.

The second instance is handled by the attached patch, which provides a new boolean configuration parameter, copyexternal, which is used by _handleURL. It defaults to 1 (for backwards compatibility).

This patch also contains a fix to _rsrcpath to ignore URLish paths. This is actually a bug fix, as _handleURL will return the URL if it could not parse or retrieve the contents. This was passed on to _rsrcpath which assumed all paths were local directory paths.

I've had to also include the patch from Item11339 in this patch. Sorry about the mess.

The patch should apply against version 2.3.2 of the plugin.

-- DiabJerius - 09 Dec 2011

Patch applied.

-- CrawfordCurrie - 30 Jul 2012

 

ItemTemplate edit

Summary Make copying of external resources (images) optional
ReportedBy DiabJerius
Codebase
SVN Range
AppliesTo Extension
Component PublishPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins PublishPlugin:0dbee3f2b001
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins PublishPlugin:0dbee3f2b001
Release01x01Checkins
I Attachment Action Size Date Who Comment
external-resource.patchpatch external-resource.patch manage 1 K 09 Dec 2011 - 21:55 DiabJerius  
Topic revision: r4 - 30 Jul 2012, CrawfordCurrie
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