« Escape accolade » : différence entre les versions

De Semantic MediaWiki - Sandbox

(Page créée avec « * Accolade {{#set:Description=Accolade-left: {}} * HTML character entity reference - {{#set:Description=HTML entity reference: {}} * template with nowiki in it- {... »)
 
Aucun résumé des modifications
 
(9 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
* Accolade {{#set:Description=Accolade-left: {}}
Curly braces can't be used in parser functions like 'set' (or 'var'). Escaping them gives issues in different result formats.
* HTML character entity reference - {{#set:Description=HTML entity reference: {}}
 
* template with nowiki in it- {{#set:Description=HTML entity reference: {{Accolade left}} }}
In most cases, the 'nowiki'-tag is shown, wrapped around the full value (while it is only used at the end). Expected behaviour: the nowiki-tag is not shown.
* [[Description::Accolade-left: {]]
In
 
 
* Accolade {{#set:Has text=Accolade-left: {end}}
* HTML character entity reference - {{#set:Has text=HTML entity reference: {end}}
* nowiki - {{#set:Has text=nowiki: <nowiki>{</nowiki> end}}
* [[Template:Accolade left|template]] curly bracket in it - {{#set:Has text=Template with nowiki: {{Accolade left}} end}}
* [[Has text::semantic link: { end]]
{{DISPLAYTITLE:escaped &#123; }}
==default-result (broadtable)==
{{#ask: [[Escape accolade]]
|?Has text
|propsep=;
|valuesep=<br />
}}
==ul==
 
{{#ask: [[Escape accolade]]
|?Has text
|format=ul
|limit=250
|propsep=;
|valuesep=<br />
}}
 
Verify it's not the valuesep=br, by ommitting it:
 
{{#ask: [[Escape accolade]]
|?Has text
|format=ul
|limit=250
|propsep=;
}}
==ol==
{{#ask: [[Escape accolade]]
|?Has text
|format=ol
|limit=250
|propsep=;
|valuesep=<br />
}}
==plainlist==
{{#ask: [[Escape accolade]]
|?Has text
|format=plainlist
|limit=250
|propsep=;
|valuesep=<br />
}}
==list==
{{#ask: [[Escape accolade]]
|?Has text
|format=list
|limit=250
|propsep=;
|valuesep=<br />
}}
==csv==
In CSV the displaytitle is not taken into account; the value for page name is the full page name.
 
{{#ask: [[Escape accolade]]
|?Has text
|format=csv
|limit=250
|propsep=;
|filename=curly-bracket
}}
==rdf==
In RDF-XML and RDF Turtle the displaytitle is ignored. The html character entity code is not decoded. The 'nowiki' tag is preserved.
 
{{#ask: [[Escape accolade]]
|?Has text
|format=rdf
|limit=250
|propsep=;
|filename=curly-bracket
|searchlabel=RDF-XML
}}
{{#ask: [[Escape accolade]]
|?Has text
|format=rdf
|limit=250
|propsep=;
|filename=curly-bracket
|syntax=turtle
|searchlabel=RDF Turtle (TTL)
}}
==json==
In JSON, the html entity character entity is not parsed and nowiki is shown *and* used. Also in the value for 'displaytitle'.
 
{{#ask: [[Escape accolade]]
|?Has text
|format=json
|limit=250
|propsep=;
|filename=curly-bracket
}}

Dernière version du 20 septembre 2023 à 12:36

Curly braces can't be used in parser functions like 'set' (or 'var'). Escaping them gives issues in different result formats.

In most cases, the 'nowiki'-tag is shown, wrapped around the full value (while it is only used at the end). Expected behaviour: the nowiki-tag is not shown. In


  • Accolade
  • HTML character entity reference -
  • nowiki -
  • template curly bracket in it -
  • semantic link: { end

default-result (broadtable)

 Has text
escaped {Accolade-left: {end
HTML entity reference: {end
<nowiki>nowiki: { end</nowiki>
Template with nowiki: { end
semantic link: { end

ul

  • escaped { (Has text: Accolade-left: {end
    HTML entity reference: {end
    <nowiki>nowiki: { end</nowiki>
    Template with nowiki: { end
    semantic link: { end
    )

Verify it's not the valuesep=br, by ommitting it:

  • escaped { (Has text: Accolade-left: {end, HTML entity reference: {end, <nowiki>nowiki: { end</nowiki>, Template with nowiki: { end, semantic link: { end)

ol

  1. escaped { (Has text: Accolade-left: {end
    HTML entity reference: {end
    <nowiki>nowiki: { end</nowiki>
    Template with nowiki: { end
    semantic link: { end
    )

plainlist

escaped { (Has text: Accolade-left: {end
HTML entity reference: {end
<nowiki>nowiki: { end</nowiki>
Template with nowiki: { end
semantic link: { end)

list

escaped { (Has text: Accolade-left: {end
HTML entity reference: {end
<nowiki>nowiki: { end</nowiki>
Template with nowiki: { end
semantic link: { end)

csv

In CSV the displaytitle is not taken into account; the value for page name is the full page name.

CSV

rdf

In RDF-XML and RDF Turtle the displaytitle is ignored. The html character entity code is not decoded. The 'nowiki' tag is preserved.

RDF-XML RDF Turtle (TTL)

json

In JSON, the html entity character entity is not parsed and nowiki is shown *and* used. Also in the value for 'displaytitle'.

JSON

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.