Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 83B9D200C35 for ; Sun, 12 Mar 2017 16:24:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 82379160B8A; Sun, 12 Mar 2017 15:24:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CD432160B63 for ; Sun, 12 Mar 2017 16:23:59 +0100 (CET) Received: (qmail 47983 invoked by uid 500); 12 Mar 2017 15:23:59 -0000 Mailing-List: contact commits-help@jspwiki.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jspwiki.apache.org Delivered-To: mailing list commits@jspwiki.apache.org Received: (qmail 47960 invoked by uid 99); 12 Mar 2017 15:23:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Mar 2017 15:23:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D454ADFE8F; Sun, 12 Mar 2017 15:23:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brushed@apache.org To: commits@jspwiki.apache.org Date: Sun, 12 Mar 2017 15:23:58 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] jspwiki git commit: ImagePlugin : handling class/styles; caption fix archived-at: Sun, 12 Mar 2017 15:24:00 -0000 Repository: jspwiki Updated Branches: refs/heads/master 64ffe2e49 -> aca4ab64d ImagePlugin : handling class/styles; caption fix 2.10.3-git-35 Project: http://git-wip-us.apache.org/repos/asf/jspwiki/repo Commit: http://git-wip-us.apache.org/repos/asf/jspwiki/commit/2235abad Tree: http://git-wip-us.apache.org/repos/asf/jspwiki/tree/2235abad Diff: http://git-wip-us.apache.org/repos/asf/jspwiki/diff/2235abad Branch: refs/heads/master Commit: 2235abadb47b831e04e8ae7558d8f23e912b7607 Parents: 64ffe2e Author: brushed Authored: Sun Mar 12 16:22:24 2017 +0100 Committer: brushed Committed: Sun Mar 12 16:22:24 2017 +0100 ---------------------------------------------------------------------- .../main/java/org/apache/wiki/plugin/Image.java | 28 +++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jspwiki/blob/2235abad/jspwiki-war/src/main/java/org/apache/wiki/plugin/Image.java ---------------------------------------------------------------------- diff --git a/jspwiki-war/src/main/java/org/apache/wiki/plugin/Image.java b/jspwiki-war/src/main/java/org/apache/wiki/plugin/Image.java index 5ee799a..f12f1da 100644 --- a/jspwiki-war/src/main/java/org/apache/wiki/plugin/Image.java +++ b/jspwiki-war/src/main/java/org/apache/wiki/plugin/Image.java @@ -118,7 +118,7 @@ public class Image throw new PluginException("Parameter 'src' is required for Image plugin"); } - if( cssclass == null ) cssclass = "imageplugin"; + //if( cssclass == null ) cssclass = "imageplugin"; if( target != null && !validTargetValue(target) ) { @@ -142,13 +142,18 @@ public class Image StringBuilder result = new StringBuilder(); - result.append( ""+TextUtil.replaceEntities(caption)+"\n"); + result.append("\n"); } + //move css class and style to the container of the image, + //so it doesn't affect the caption + result.append( "
"+caption+"
" ); + result.append( ">" ); if( link != null ) {