On Thu, Mar 4, 2010 at 16:42, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
On Thu, Mar 4, 2010 at 16:31, Vincent Massol
<vincent(a)massol.net> wrote:
On Mar 4, 2010, at 4:27 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2010-03-04 16:27:02 +0100 (Thu, 04 Mar 2010)
> New Revision: 27446
>
> Added:
>
platform/core/trunk/xwiki-core/src/test/java/com/xpn/xwiki/util/TOCGeneratorTest.java
> Modified:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java
> Log:
> XWIKI-4971: Header generated ids are wrong in 1.0 syntax
>
> Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java
2010-03-04 14:57:59 UTC (rev 27445)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java
2010-03-04 15:27:02 UTC (rev 27446)
> @@ -119,7 +119,7 @@
>
> public static String makeHeadingID(String text, int occurence, XWikiContext
context)
> {
> - text = "H" + Util.encodeURI(text, context);
> + text = "H" + text;
> text = text.replaceAll("[^a-zA-Z0-9]", "");
>
> if (occurence > 0) {
>
> Added:
platform/core/trunk/xwiki-core/src/test/java/com/xpn/xwiki/util/TOCGeneratorTest.java
> ===================================================================
> ---
platform/core/trunk/xwiki-core/src/test/java/com/xpn/xwiki/util/TOCGeneratorTest.java
(rev 0)
> +++
platform/core/trunk/xwiki-core/src/test/java/com/xpn/xwiki/util/TOCGeneratorTest.java
2010-03-04 15:27:02 UTC (rev 27446)
> @@ -0,0 +1,16 @@
> +package com.xpn.xwiki.util;
> +
> +import junit.framework.Assert;
> +
> +import org.junit.Test;
> +
> +public class TOCGeneratorTest
missing license header + @since/@version javadoc.
Sorry, written the test too fast