Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
5.4.3, 6.0
-
None
Description
Hello,
The include function is to hard to use with some non-us character like french: éèà'ç ...
By example, I have a document with this section:
= Level1 - Séct-io'n 4 = Bla bla
if I want to include this section: "Level1 - Séct-io'n 4" I must use this include
{{include reference="Pagefille2" section="HLevel1-SE9ct-io27n4"/}}
I must replace special character with unicode code:
http://www.utf8-chartable.de/
NB: anchor (%id="mycustomid"%) doesn't work with include section.
Vincent explained me the raison:
id attribute respect XHTML RFC
- When defining fragment identifiers to be backward-compatible, only strings matching the pattern
- [A-Za-z][A-Za-z0-9:_.-]* should be used
Then - @param prefix the prefix of the identifier. Has to match [a-zA-Z].
- @param text the text used to generate the unique id
- @return the unique id. For example "Hello world" will generate prefix + "Helloworld".
*/
public String generateUniqueId(String prefix, String text)
Called with:
id = idGenerator.generateUniqueId("H", text);
This is why for the text “Level1 - Séct-io'n 4” we generate “HLevel1-SE9ct-io27n4"
Then could you modify idGenerator.generateUniqueId to remove all character not in [A-Za-z0-9:_.-] regexp and add -1 if we have twice the same heading?
It will be simpler for user I think.
Thxs