Page MenuHomePhabricator

HTML entities to disable markup in a string property display as link in factbox
Closed, ResolvedPublic

Description

Author: info

Description:
I tried to disable parsing markup in a string property using [ and ] for [ and ]. (Caution, this bug may not print properly.)

[[String test::Entities hide brackets here [[Test relation::Sandbox3]], what happens?]]

This displays square brackets around the nested annotation inline and in inline queries (good!)

But in the factbox the nested annotation appears as a page link to the bogus page Test_relation::Sandbox3.

See bug 13474 for problems using <nowiki> tags to disable parsing.

I'm rating this minor because it seems convoluted. I think users just want one reliable way to disable parsing.


Version: unspecified
Severity: minor
URL: http://ontoworld.org/wiki/SMW_unit_test:Test_attributes#Disabling_markup

Details

Reference
bz13475

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:02 PM
bzimport set Reference to bz13475.

The behavior has changed in recent versions of SMW. All brackets in property values are now disallowed (not just double brackets). Also, having multiple occurrences of "::" is considered as an annotation with multiple properties, similar to

[[property1::property2::value]].

However, the following works now:

[[String test::Entities hide brackets here &#91;&#91;Test&#93;&#93;, what happens?]]

To use "::" in values, one also needs to do some escaping:

[[String test::Entities hide brackets here &#91;&#91;Test relation&#58;&#58;Sandbox3&#93;&#93;, what happens?]]

Most interfaces will properly display the text by expanding entities. Search interfaces expect the entity encoding to be used when searching such values. The RDF export replaces entities with the encoded Unicode symbols. Another way of setting problematic annotation values is to use the #set parser function of SMW: since it uses a template-like input syntax, it is not sensitive to certain special characters.