You are here: Foswiki>Tasks Web>Item252 (06 Jul 2015, GeorgeClark)Edit Attach

Item252: Render is too aggressive converting ! to <nop>

Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiRender
Branches: master
Reported By: WillNorris
Waiting For:
Last Change By: GeorgeClark
look at

!= gets rendered as simply =

perhaps ! should have a requirement to only NOP WikiWords?

-- WillNorris - 23 Nov 2008 - 00:59

The issue is that the "not equal" (=) string in the topic is rendered as "equal" (=) in the diff. Fails right here as well in plain render. The ! is removed from the not-equal in the parenthesis.

Note that this fails on both RDiff and CompareRevisionsAddOn.

-- GeorgeClark - 24 May 2011

Changing this to Urgent. Bad news to corrupt example code in a wiki: This example is written as a not-equals.

if ( $a = $b ) Do something

-- GeorgeClark - 04 Jan 2015

The root cause is use of ! to escape wiki markup in addition to wikiWords. The aggressive conversion of ! to also supports:
Escaped Not escaped Standalone
=Code= Code =
*Bold* Bold *
_Italics_ Italics _ name

Any ! prefix is converted to nop.

-- GeorgeClark - 04 Jan 2015

And this is actually documented in WikiSyntax:

  • To escape the exclamation mark escape, try prefixing a <nop>, e.g. write A <nop>!= B to get "A != B". Alternatively, use the HTML entity &#33;, which renders as an exclamation mark, e.g. write A &#33;= B to get "A != B".

-- GeorgeClark - 04 Jan 2015

As much as this is annoying, it has worked this way since before Foswiki 1.0, No way this should be a blocker. It's working as documented. Changing this back to an enhancement. Changing something this fundamental to render this late in the release would be too risky.

-- GeorgeClark - 07 Jan 2015

ItemTemplate edit

Summary Render is too aggressive converting ! to <nop>
ReportedBy WillNorris
Codebase 1.1.3, trunk
SVN Range TWiki-4.2.3, Wed, 06 Aug 2008, build 17396
AppliesTo Engine
Component FoswikiRender
Priority Enhancement
CurrentState Proposal Required
Checkins distro:a2cfc64446a7
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches master
masterCheckins distro:a2cfc64446a7
Topic revision: r7 - 06 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy