[pmwiki-users] Wikiwords and style identifiers bug and workaround

John Rankin john.rankin at affinity.co.nz
Tue Aug 8 23:27:48 CDT 2006


On Wednesday, 9 August 2006 1:43 PM, Pico <pmwiki at ben-amotz.com> wrote:
>Dominique Faure wrote:
>> Hi,
>> 
>> Developing a new cookbook recipe involving divs, my kindly beta-tester
>> found that using a Wikiword as a style identifier breaks the page
>> output.
>> 
>> An example is available at http://www.pmwiki.org/wiki/Test/WikiWordsAndStyles
>> 
>> The reason is that during the page markup translation, links/wikiwords
>> are handled before blocks/styles, so such identifier is recognized and
>> interpreted as a wikiword wherever it could occur in the page.
>> 
>> A workaround could be to introduce non wikiword chars allowed in
>> identifiers (underscores,...) or even use the fact that forbidden
>> chars in identifiers are replaced by underscore:
>> 
>> (:div id='an identifier with forbidden chars':)
>> ...
>> 
>> In the markup above, the identifier is rendered as:
>> 
>> <div id='an_identifier_with_forbidden_chars'>
>> ...
>> 
>
>Yeah, I noticed this when I was testing the ShowHide recipe back in 
>March and noted the following workarounds:
>
>"Naming a div id. Watch out for Uppercase characters. If your first 
>character is uppercase, then all the rest must be in lowercase (Abc). 
>Additional capitals (ABc and AbC) will cause the markup to fail. If your 
>first character is lowercase, however, then you can have multiple 
>uppercase characters (aBC). --Pico"
>
>
>Pico
>
What happens if you "escape" the wikiword?

>>id='`MyDiv'<<

Fromm memory, the `MyDiv will be put in a Keep and restored in time
for style processing.
-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list