Hi Guys,
How can i get the currently logged in users in a separate page.(Currently
logged in of all the users in xwiki).
if i use the following *$context.user* its showing the currently logged in
user id.
Please comment.
--
Prathap
Hi,
I'd like to propose that the default target option for link insertion in the
new WYSIWYG editor be as follows:
- Internal link: use the default target (not specified)
- External Links: use target_blank to force opening the page in a new tab
/ window (at a later stage we could do the same thing that otehr wikis such
as Confluence or MediaWiki and add a small icon showing that the links
points to outside of the wiki)
So that the user does not lose contact with the wiki.
WDYT?
Guillaume
--
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://blog.xwiki.com/
Hi Devs,
I have hit a wall trying to implement Digest Access Authentication for the
xwiki-webdav module. I'll try to be clear as much as possible.
*+ INTRO* : Digest Access Authentication is used to avoid the transmission
of clear text passwords over http for authenticating users. Instead of the
clear text password, following hash (RESPONSE) will be transferred to the
server by client,
HA1 = MD5(username,password,realm)
HA2 = MD5(method,digestURI)
RESPONSE = MD5(HA1,nonce,HA2)
Here the 'nonce' is some weird string token generated by the server for that
particular client for a particular session. So the RESPONSE instead of the
clear text password will be transferred to the server. For more specific
information about Digest Authentication, you may refer [1].
*+ PROBLEM* : Simply put, the way xwiki handles authentication requires the
presentation of a clear text password by the client (which is not available
with Digest Authentication scheme). What we have with xwiki (on the server
side) is a crypted version of the original password.
One possible solution to overcome this limitation is to store the HA1 value
in our databases (is this possible ?). This is one of the limitations of
Digest Authentication scheme as mentioned in [1] :
*"There is an important problem with implementing Digest access
authentication. This is the requirement that either cleartext passwords or
the HA1 hashes must be known in order to perform client response validation"
*
I would like to know what other developers have to say about this issue, and
possible workarounds ... [?]
Thanks.
- Asiri
[1] http://en.wikipedia.org/wiki/Digest_access_authentication
Hi Marius,
On Oct 29, 2008, at 5:23 PM, mflorea (SVN) wrote:
> Author: mflorea
> Date: 2008-10-29 17:23:28 +0100 (Wed, 29 Oct 2008)
> New Revision: 13895
>
> Modified:
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/Config.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/Plugin.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/PluginFactory.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/PluginFactoryManager.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/PluginManager.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/plugin/UIExtension.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/ui/cmd/CommandListener.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/ui/cmd/CommandListenerCollection.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/ui/cmd/CommandManager.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/ui/cmd/SourcesCommandEvents.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/ui/cmd/internal/AbstractCommandManager.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/util/DOMUtils.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/util/Document.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/util/internal/IEDOMUtils.java
> platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/
> client/util/internal/MozillaDOMUtils.java
> Log:
> * more javadoc
> * ability to import DOM nodes (the current GWT support for this is
> broken); this is needed for the FormatInline command that I'm writing.
One remark: I hope that you're putting these comments in the code as
otherwise it'll be imposible to remember why you're doing extra work
in the code in 6 months time.
It's very important that anything not standard/normal is fully
documented with a reference on the web to the reason and even better
with a link too on the issue in the project issue tracer that
references the pb so that when it's fixed we can remove our cruft.
Thanks
-Vincent
Hi,
I had proposed to use the ^ character as attachment delimiter.
Ex: wiki:Space.Page^attachment
However I've just realized while implementing it that it's an "unwise"
character in an URI
(source: http://www.ietf.org/rfc/rfc2396.txt)
unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"
Allowed punctuations characters are:
mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
BTW the following are reserved:
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
Note that we use ":" for wiki delimiter but that's okay since we're
using an opaque URI and thus reserved chars, unreserved chars and
escaped chars are authorized.
I think it would be better to choose amongst one the valid chars for
the attachment to prevent future problems.
Of course this means we'll have to make that character forbidden in a
page name. Actually we could also decide that it's character forbidden
in an attachment (and use lastIndexOf() instead of indexOf() to
separate the page name from the attachment name). Or we could double
it once again...
I propose we use the @ symbol since it's not a char used often in page
names.
For example:
attach:wiki:Space.Page@my.doc
This raises the discussion of the full FQN we'd like to have when we
support nested spaces too. For example:
(wiki name) "::" (space name) [ "." (space name)]* "::" (page name)
["@" (attachment name)]?
Now what about referencing objects and properties using a URI too? Do
we want that? What would be the use? Right now I don't see a use and
using an API to access them seems fine to me.
Alternative view
============
We could also only specify the attachment name in the uri and use link
parameters to specify the document where it's located as in:
[[image:my.png>>document="wiki:Space.Page"]]
This sounds reasonable to me too. I think the real question is whether
we need a textual representation of an attachment FQN or not.
WDYT?
Thanks
-Vincent
Hi Vincent,
Ok, will revert those changes.
Btw, why I tried to use static methods instead of separate classes is
because those classes seemed to be doing very little. I mean those classes
were utilized like,
<code>
new TagRemoveFilter().doFilter(document);
new UnderlineLinkFilter().filter(document);
new XWikiSyntaxEscapeFilter().doFilter(document);
new ImageTagFilter().doFilter(document);
new PinLiFilter().doFilter(document);
new EmptyLinkFilter().doFilter(document);
</code>
That's all. Something didn't look right to me. And also it seems to clutter
the functionality into a lots of tiny classes.
Thanks.
- Asiri
Hi Asiri,
I don't like this "core" package. It's very artificial IMO. The core
should be the main package.
Also, I'd put the HTMLFilter interface in the filters package.
Re the plural "filters" vs "filter" we need to decide. In the
rendering module we've decided to use the singular form everywhere. In
xwiki-core the majority is also singular. So I'd propose the use
always the singular form. WDYT?
Thanks
-Vincent
On Oct 28, 2008, at 5:50 PM, asiri (SVN) wrote:
> Author: asiri
> Date: 2008-10-28 17:50:32 +0100 (Tue, 28 Oct 2008)
> New Revision: 13873
>
> Added:
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/core/
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/core/HTMLFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/
> Removed:
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/HTMLFilter.java
> Modified:
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/OfficeImporterPlugin.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/EmptyLinkFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/ImageTagFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/PinLiFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/TagRemoveFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/UnderlineLinkFilter.java
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/XWikiSyntaxEscapeFilter.java
> sandbox/xwiki-plugin-officeimporter/src/test/java/com/xpn/xwiki/
> plugin/officeconverter/CleanHTMLTest.java
> Log:
> Introduced a new package for core interfaces of the plugin. Renames
> the .filter package to .filters
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/OfficeImporterPlugin.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/OfficeImporterPlugin.java 2008-10-28 16:46:15
> UTC (rev 13872)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/OfficeImporterPlugin.java 2008-10-28 16:50:32
> UTC (rev 13873)
> @@ -57,12 +57,12 @@
> import com.xpn.xwiki.doc.XWikiDocument;
> import com.xpn.xwiki.plugin.XWikiDefaultPlugin;
> import com.xpn.xwiki.plugin.XWikiPluginInterface;
> -import com.xpn.xwiki.plugin.officeimporter.filter.EmptyLinkFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.ImageTagFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.PinLiFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.TagRemoveFilter;
> -import
> com.xpn.xwiki.plugin.officeimporter.filter.UnderlineLinkFilter;
> -import
> com.xpn.xwiki.plugin.officeimporter.filter.XWikiSyntaxEscapeFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.EmptyLinkFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.ImageTagFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.PinLiFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.TagRemoveFilter;
> +import
> com.xpn.xwiki.plugin.officeimporter.filters.UnderlineLinkFilter;
> +import
> com.xpn.xwiki.plugin.officeimporter.filters.XWikiSyntaxEscapeFilter;
> import com.xpn.xwiki.plugin.officeimporter.utils.ImporterException;
> import com.xpn.xwiki.plugin.officeimporter.utils.DocumentType;
> import com.xpn.xwiki.web.Utils;
> @@ -500,12 +500,12 @@
> }
> Document document = htmlCleaner.clean(new
> StringReader(inputHTML));
>
> - new TagRemoveFilter().filter(document);
> + new TagRemoveFilter().doFilter(document);
> new UnderlineLinkFilter().filter(document);
> - new XWikiSyntaxEscapeFilter().filter(document);
> - new ImageTagFilter().filter(document);
> - new PinLiFilter().filter(document);
> - new EmptyLinkFilter().filter(document);
> + new XWikiSyntaxEscapeFilter().doFilter(document);
> + new ImageTagFilter().doFilter(document);
> + new PinLiFilter().doFilter(document);
> + new EmptyLinkFilter().doFilter(document);
>
> XMLUtils.stripHTMLEnvelope(document);
> String cleanedHTML = XMLUtils.toString(document);
>
> Copied: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/core/HTMLFilter.java (from rev 13871,
> sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/HTMLFilter.java)
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/core/HTMLFilter.java
> (rev 0)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/core/HTMLFilter.java 2008-10-28 16:50:32 UTC
> (rev 13873)
> @@ -0,0 +1,38 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package com.xpn.xwiki.plugin.officeimporter.core;
> +
> +import org.w3c.dom.Document;
> +
> +/**
> + * The filter to clean the html. This Filter only can handle the
> {@link Document}.
> + *
> + * @version $Id$
> + * @since 1.6M1
> + */
> +public interface HTMLFilter
> +{
> + /**
> + * Do some clean action to the html code stored in {@link
> Document}.
> + *
> + * @param element the {@link Document} with html code
> + */
> + void doFilter(Document document);
> +}
>
>
> Property changes on: sandbox/xwiki-plugin-officeimporter/src/main/
> java/com/xpn/xwiki/plugin/officeimporter/core/HTMLFilter.java
> ___________________________________________________________________
> Name: svn:keywords
> + Id
> Name: svn:mergeinfo
> +
>
> Copied: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters (from rev 13871, sandbox/xwiki-
> plugin-officeimporter/src/main/java/com/xpn/xwiki/plugin/
> officeimporter/filter)
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/EmptyLinkFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/EmptyLinkFilter.java 2008-10-28
> 16:45:05 UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/EmptyLinkFilter.java 2008-10-28
> 16:50:32 UTC (rev 13873)
> @@ -17,13 +17,15 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> import org.w3c.dom.Node;
> import org.w3c.dom.NodeList;
>
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +
> /**
> * Only for convert2html.<br/> As the xwiki 1.0 xhtml render now
> don't handle the empty link very well, so need to
> * remove the empty link from the html. <br/> If a label of the link
> is empty, it's a empty link, {@code <a />} or
> @@ -36,7 +38,7 @@
> public class EmptyLinkFilter implements HTMLFilter
> {
>
> - public void filter(Document document)
> + public void doFilter(Document document)
> {
> Element root = document.getDocumentElement();
> NodeList links = root.getElementsByTagName("a");
>
> Deleted: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/HTMLFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/HTMLFilter.java 2008-10-28 16:45:05 UTC
> (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/HTMLFilter.java 2008-10-28 16:50:32
> UTC (rev 13873)
> @@ -1,38 +0,0 @@
> -/*
> - * See the NOTICE file distributed with this work for additional
> - * information regarding copyright ownership.
> - *
> - * This is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU Lesser General Public License as
> - * published by the Free Software Foundation; either version 2.1 of
> - * the License, or (at your option) any later version.
> - *
> - * This software is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this software; if not, write to the Free
> - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> - * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> - */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> -
> -import org.w3c.dom.Document;
> -
> -/**
> - * The filter to clean the html. This Filter only can handle the
> {@link Document}.
> - *
> - * @version $Id$
> - * @since 1.6M1
> - */
> -public interface HTMLFilter
> -{
> - /**
> - * Do some clean action to the html code stored in {@link
> Document}.
> - *
> - * @param element the {@link Document} with html code
> - */
> - void filter(Document document);
> -}
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/ImageTagFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/ImageTagFilter.java 2008-10-28 16:45:05
> UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/ImageTagFilter.java 2008-10-28
> 16:50:32 UTC (rev 13873)
> @@ -17,7 +17,7 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> @@ -26,6 +26,8 @@
> import org.w3c.dom.NodeList;
> import org.w3c.dom.Text;
>
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +
> /**
> * Only for convert2html<br/> This is only for the html rendering in
> xwiki syntax 1.0, as it can't find the image's src
> * in img tag. Replace the {@code <img>} tag to {image}. Handled
> attribute: src, width, height, alt, align.
> @@ -36,7 +38,7 @@
> public class ImageTagFilter implements HTMLFilter
> {
>
> - public void filter(Document document)
> + public void doFilter(Document document)
> {
> Element root = document.getDocumentElement();
> NodeList imgs = root.getElementsByTagName("img");
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/PinLiFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/PinLiFilter.java 2008-10-28 16:45:05
> UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/PinLiFilter.java 2008-10-28 16:50:32
> UTC (rev 13873)
> @@ -17,13 +17,15 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> import org.w3c.dom.Node;
> import org.w3c.dom.NodeList;
>
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +
> /**
> * Only for convert2html<br/>As the xwiki 1.0 xhtml render don't
> display the first p tag just followed to list tag
> * appropriately, need to remove the first {@code <p>} tag in the
> {@code <li>} tag.
> @@ -34,7 +36,7 @@
> public class PinLiFilter implements HTMLFilter
> {
>
> - public void filter(Document document)
> + public void doFilter(Document document)
> {
> Element root = document.getDocumentElement();
> NodeList lists = root.getElementsByTagName("li");
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/TagRemoveFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/TagRemoveFilter.java 2008-10-28
> 16:45:05 UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/TagRemoveFilter.java 2008-10-28
> 16:50:32 UTC (rev 13873)
> @@ -17,13 +17,15 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> import org.w3c.dom.Node;
> import org.w3c.dom.NodeList;
>
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +
> /**
> * Remove some tag from html, such as style, script. The tag and all
> the contents under the tag will be removed.
> *
> @@ -34,7 +36,7 @@
> {
> private final String[] toRemovedTags = {"style", "script"};
>
> - public void filter(Document document)
> + public void doFilter(Document document)
> {
> Element root = document.getDocumentElement();
> for (String tag : toRemovedTags) {
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/UnderlineLinkFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/UnderlineLinkFilter.java 2008-10-28
> 16:45:05 UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/UnderlineLinkFilter.java 2008-10-28
> 16:50:32 UTC (rev 13873)
> @@ -17,7 +17,7 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/
> xwiki/plugin/officeimporter/filters/XWikiSyntaxEscapeFilter.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filter/XWikiSyntaxEscapeFilter.java 2008-10-28
> 16:45:05 UTC (rev 13871)
> +++ sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
> plugin/officeimporter/filters/XWikiSyntaxEscapeFilter.java
> 2008-10-28 16:50:32 UTC (rev 13873)
> @@ -17,7 +17,7 @@
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> -package com.xpn.xwiki.plugin.officeimporter.filter;
> +package com.xpn.xwiki.plugin.officeimporter.filters;
>
> import java.util.ArrayList;
> import java.util.List;
> @@ -28,6 +28,8 @@
> import org.w3c.dom.NodeList;
> import org.w3c.dom.Text;
>
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +
> /**
> * Only for convert2html<br/> Change the html content conflicting
> with xwiki syntax to escape. Such as replace {@code [}
> * to {@code \]}
> @@ -66,7 +68,7 @@
> // escapeChars.add("k");
> }
>
> - public void filter(Document document)
> + public void doFilter(Document document)
> {
> Element root = document.getDocumentElement();
> cleanNode(root);
>
> Modified: sandbox/xwiki-plugin-officeimporter/src/test/java/com/xpn/
> xwiki/plugin/officeconverter/CleanHTMLTest.java
> ===================================================================
> --- sandbox/xwiki-plugin-officeimporter/src/test/java/com/xpn/xwiki/
> plugin/officeconverter/CleanHTMLTest.java 2008-10-28 16:46:15 UTC
> (rev 13872)
> +++ sandbox/xwiki-plugin-officeimporter/src/test/java/com/xpn/xwiki/
> plugin/officeconverter/CleanHTMLTest.java 2008-10-28 16:50:32 UTC
> (rev 13873)
> @@ -27,13 +27,13 @@
> import org.xwiki.xml.XMLUtils;
> import org.xwiki.xml.html.HTMLCleaner;
>
> -import com.xpn.xwiki.plugin.officeimporter.filter.EmptyLinkFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.HTMLFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.ImageTagFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.PinLiFilter;
> -import com.xpn.xwiki.plugin.officeimporter.filter.TagRemoveFilter;
> -import
> com.xpn.xwiki.plugin.officeimporter.filter.UnderlineLinkFilter;
> -import
> com.xpn.xwiki.plugin.officeimporter.filter.XWikiSyntaxEscapeFilter;
> +import com.xpn.xwiki.plugin.officeimporter.core.HTMLFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.EmptyLinkFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.ImageTagFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.PinLiFilter;
> +import com.xpn.xwiki.plugin.officeimporter.filters.TagRemoveFilter;
> +import
> com.xpn.xwiki.plugin.officeimporter.filters.UnderlineLinkFilter;
> +import
> com.xpn.xwiki.plugin.officeimporter.filters.XWikiSyntaxEscapeFilter;
> import com.xpn.xwiki.plugin.officeimporter.utils.ImporterException;
> import com.xpn.xwiki.test.AbstractXWikiComponentTestCase;
>
> @@ -122,12 +122,12 @@
> {
> Document document = cleaner.clean(new StringReader(input));
>
> - new TagRemoveFilter().filter(document);
> + new TagRemoveFilter().doFilter(document);
> new UnderlineLinkFilter().filter(document);
> - new XWikiSyntaxEscapeFilter().filter(document);
> - new ImageTagFilter().filter(document);
> - new PinLiFilter().filter(document);
> - new EmptyLinkFilter().filter(document);
> + new XWikiSyntaxEscapeFilter().doFilter(document);
> + new ImageTagFilter().doFilter(document);
> + new PinLiFilter().doFilter(document);
> + new EmptyLinkFilter().doFilter(document);
>
> XMLUtils.stripHTMLEnvelope(document);
> String actual = XMLUtils.toString(document);
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
Hi,
In the current implementation of the new WYSIWYG editor, the following
behavior occurs :
1. Type a word (say, "Test")
2. Highlight that word and make it a level 1 title
3. Put the caret at the beginning of the selection ("|Test" where "|" is
the caret) and hit <return>
1. *Text on the second line is now a Level 1 title, as expected*
4. Go back to the previous line (using the <arrow up> key for
instance)
5. Start typing on the top line: the text uses the level 1 title style
(it does the same thing with other styles, such as bold or italics)
After talking with our project managers I think this should not happen: when
the user goes back to the previous line and starts typing, the text should
use the "normal" style (that is, no style at all) rather than the style that
was previously set on that line. In other words, styles should be applied to
words and content but not to lines themselves.
So in the end we would have :
| *(normal text, no style selected)*
LEVEL 1 TITLE
instead of
| *(level one title selected)*
LEVEL ONE TITLE
When the users hits <return> after writing LEVEL ONE TITLE.
Here's my informal +1 for this proposal.
Guillaume
--
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://blog.xwiki.com/
I'm proposing to implement a new property type: A foreign key,
analogous to the concept in relational databases. Together with custom
mapping, a property like this would make it possible to use Xwiki as a
frontend for a relational database, while making full use of the wikis
capabilities(configurability, history, etc).
The implementation would look similar to the existing "Database list"
on the outside, but it would make a lot more use of the databases
features. If A links to B, and someone deletes B the reference in A
would either be set to null, or the delete would be stopped, depending
on the configuration. It would also make it possible to adress
associated objects directly in hql.
The basic functionality can be emulated using DBList(adding a property
to one object by choosing from existing instances of another class),
but this is not useful if one wants to have "real" foreign key
behaviour in the wiki and the underlying DB. If there is a demand for
this I will be happy to contribute a patch once I am done, and I will
try make the code nice enough to submit. Otherwise I will probably
just make it as a hack to meet the exact need that I have...
Thomas