Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-5067

SitesWikiListener does not respect image markup correctly

    XMLWordPrintable

    Details

      Description

      The getLinks method does not cater for image markup (it only searches for '[' and ']' returning the substring between when there could also be a 'image:' prefix.

      A fix could be:

      diff -r d63d5697a2c6 nuxeo-webengine-features/nuxeo-webengine-sites-core-contrib/src/main/java/org/nuxeo/webengine/sites/listeners/SitesWikiListener.java
      — a/nuxeo-webengine-features/nuxeo-webengine-sites-core-contrib/src/main/java/org/nuxeo/webengine/sites/listeners/SitesWikiListener.java Wed Mar 17 20:37:09 2010 +0100
      +++ b/nuxeo-webengine-features/nuxeo-webengine-sites-core-contrib/src/main/java/org/nuxeo/webengine/sites/listeners/SitesWikiListener.java Sun May 02 22:19:19 2010 +0100
      @@ -147,6 +147,9 @@
      break;
      }
      startPosition++;
      + if ((startPosition+6 < content.length()) && (content.substring(startPosition, startPosition+6).equals("image:")))

      { + startPosition = startPosition+6; + }

      int endPosition = content.indexOf(closeBracket, startPosition);
      if (endPosition < 0) {
      break;

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: