public
Created

Orbeon test-case of query string encoding bug. View http://localhost:8080/ops/encoding-test/?message=it%E2%80%99s%20a%20message to trigger error

  • Download Gist
model.xpl
XProc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oxf="http://www.orbeon.com/oxf/processors">
 
<p:param name="instance" type="input" debug="model in"/>
<p:param name="data" type="output" debug="model out"/>
 
<p:processor name="oxf:request">
<p:input name="config">
<config>
<include>/request/parameters/*</include>
</config>
</p:input>
<p:output name="data" id="request" ref="data" debug="request parameters"/>
</p:processor>
 
</p:config>
page-flow.xml
XML
1 2 3 4
<config xmlns="http://www.orbeon.com/oxf/controller">
<page id="encoding-test" path-info="/encoding-test/" model="model.xpl" view="view.xml" />
<epilogue url="oxf:/config/epilogue.xpl"/>
</config>
view.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<xforms:model id="main-model">
<xforms:instance id="main" src="input:data"/>
</xforms:model>
</head>
<body>
<h1>Encoding test!</h1>
<p>
<xforms:output value="instance('main')/parameters/parameter[name eq 'message']/value"></xforms:output>
</p>
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.