Skip to content

Instantly share code, notes, and snippets.

@gabetax
Created September 13, 2012 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabetax/3716159 to your computer and use it in GitHub Desktop.
Save gabetax/3716159 to your computer and use it in GitHub Desktop.
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
<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>
<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>
<?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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment