Hello Roll20 Help Center Ticket: 83867 I found a bug regarding the Sheet.json file and the Default Sheet Settings (useroptions) when trying to use values that contain single and double quotes. I have investigated the error and found that it happens in multiple areas. I have created a video showing the error and where it can be found. Here is the link to the video: Roll20 Bug: Sheet.json cannot handle single and double quotes I will summarise my findings for each of the three test suites here: Single Quote The HTML for the button on the sheet is written like this: <input type="checkbox" name="attr_singlequoteX" value="quote'value"/> Sheet.json value Default Sheet Settings HTML value Reflected on save Reflected on sheet Comment quote'value quote ❌ ❌ The auto generated checkbox changes value, thus introducing the error quote\\'value quote\ ❌ ❌ - || - quote&apos;value quote'value ❌ ✅ The escaped character gets correctly converted, and therefore correctly set on the sheet, but it not properly updated on the Default Sheet Settings quote&amp;apos;value quote&apos;value ❌ ⚠️ The escaped character gets correctly converted once. The value is actually correct on the sheet, but not reflected on the checkbox. You have to click the value on the Attributes tab for it to update the sheet. quoteU+0027value quoteU+0027value ✅ ❌ Unicodes are not converted, and therefore does not appear on the sheet. Double Quote with incorrect HTML syntax The HTML for the button on the sheet is written like this: <input type="checkbox" name="attr_doublequoteX" value='quote"value'/> /* <--- Notice the value attribute uses single quotes. Incorrect Syntax */ Sheet.json value Default Sheet Settings HTML value Reflected on save Reflected on sheet Comment quote\"value quote"value ✅ ❌ All of these versions do not work as the generated checkbox on the character sheet has the wrong value, due to the incorrect HTML syntax. quote&quot;value quote"value ❌ ❌ quote&amp;quot;value quote&quot;value ❌ ❌ quoteU+0022value quoteU+0022value ✅ ❌ Double Quote with encoded quote on sheet The HTML for the button on the sheet is written like this: <input type="checkbox" name="attr_doublequoteX" value="quote&quot;value"/> /* <-- Encoded double quote*/ Sheet.json value Default Sheet Settings HTML value Reflected on save Reflected on sheet Comment quote\"value quote"value ✅ ✅ This combination actually works. Encoding the character in the HTML, and escaping the character in the sheet.json returns the correct result! quote&quot;value quote"value ❌ ✅ The escaped character gets correctly converted, and therefore correctly set on the sheet, but it not properly updated on the Default Sheet Settings quote&amp;quot;value quote&quot;value ❌ ⚠️ The escaped character gets correctly converted once. The value is actually correct on the sheet, but not reflected on the checkbox. You have to click the value on the Attributes tab for it to update the sheet. quoteU+0022value quoteU+0022value ✅ ❌ Unicodes are not converted, and therefore does not appear on the sheet. The code used in this example HTML: <p>Single quotes test</p>
<p>Checkboxes in HTML: <code>value="quote'value"</code></p>
<input type="checkbox" name="attr_singlequote1" value="quote'value"/>
<code>quote'value</code>
<br>
<input type="checkbox" name="attr_singlequote2" value="quote'value"/>
<code>quote\\'value</code>
<br>
<input type="checkbox" name="attr_singlequote3" value="quote'value"/>
<code>quote&amp;apos;value</code>
<br>
<input type="checkbox" name="attr_singlequote4" value="quote'value"/>
<code>quote&amp;amp;apos;value</code>
<br>
<input type="checkbox" name="attr_singlequote5" value="quote'value"/>
<code>quoteU+0027value</code>
<br>
<br>
<p>Double quote test</p>
<p>Checkboxes in HTML: <code>value='quote"value'</code></p>
<input type="checkbox" name="attr_doublequote1" value='quote"value'/>
<code>quote\"value</code>
<br>
<input type="checkbox" name="attr_doublequote2" value='quote"value'/>
<code>quote&amp;quot;value</code>
<br>
<input type="checkbox" name="attr_doublequote3" value='quote"value'/>
<code>quote&amp;amp;quot;value</code>
<br>
<input type="checkbox" name="attr_doublequote4" value='quote"value'/>
<code>quoteU+0022value</code>
<br>
<br>
<p>Double quote test</p>
<p>Checkboxes in HTML: <code>value="quote&amp;quot;value"</code></p>
<input type="checkbox" name="attr_doublequote5" value="quote&quot;value"/>
<code>quote\"value</code>
<br>
<input type="checkbox" name="attr_doublequote6" value="quote&quot;value"/>
<code>quote&amp;quot;value</code>
<br>
<input type="checkbox" name="attr_doublequote7" value="quote&quot;value"/>
<code>quote&amp;amp;quot;value</code>
<br>
<input type="checkbox" name="attr_doublequote8" value="quote&quot;value"/>
<code>quoteU+0022value</code>
<script type="text/worker">
const ATTRS = ['singlequote1', 'singlequote2', 'singlequote3', 'singlequote4', 'singlequote5',
'doublequote1', 'doublequote2', 'doublequote3', 'doublequote4',
'doublequote5', 'doublequote6', 'doublequote7', 'doublequote8'];
on(ATTRS.map(s => 'change:'+s).join(' '), function(eventInfo) {
console.log(eventInfo)
});
</script> Sheet.json: {
"useroptions": [
{
"displayname": "### Single quotes in values test ###"
},
{
"displayname": "Single quote",
"attribute": "singlequote1",
"type": "checkbox",
"value": "quote'value",
"checked": false
},
{
"displayname": "Single quote esacped",
"attribute": "singlequote2",
"type": "checkbox",
"value": "quote\\'value",
"checked": false
},
{
"displayname": "Single quote encoded",
"attribute": "singlequote3",
"type": "checkbox",
"value": "quote&apos;value",
"checked": false
},
{
"displayname": "Single quote double encoded",
"attribute": "singlequote4",
"type": "checkbox",
"value": "quote&amp;apos;value",
"checked": false
},
{
"displayname": "Single quote unicode",
"attribute": "singlequote5",
"type": "checkbox",
"value": "quoteU+0027value",
"checked": false
},
{
"displayname": " "
},
{
"displayname": "### Double quotes in values test ###"
},
{
"displayname": "Double quote esacped",
"attribute": "doublequote1",
"type": "checkbox",
"value": "quote\"value",
"checked": false
},
{
"displayname": "Double quote encoded",
"attribute": "doublequote2",
"type": "checkbox",
"value": "quote&quot;value",
"checked": false
},
{
"displayname": "Double quote double encoded",
"attribute": "doublequote3",
"type": "checkbox",
"value": "quote&amp;quot;value",
"checked": false
},
{
"displayname": "Double quote double unicode",
"attribute": "doublequote4",
"type": "checkbox",
"value": "quoteU+0022value",
"checked": false
},
{
"displayname": " "
},
{
"displayname": "Double quote esacped",
"attribute": "doublequote5",
"type": "checkbox",
"value": "quote\"value",
"checked": false
},
{
"displayname": "Double quote encoded",
"attribute": "doublequote6",
"type": "checkbox",
"value": "quote&quot;value",
"checked": false
},
{
"displayname": "Double quote double encoded",
"attribute": "doublequote7",
"type": "checkbox",
"value": "quote&amp;quot;value",
"checked": false
},
{
"displayname": "Double quote double unicode",
"attribute": "doublequote8",
"type": "checkbox",
"value": "quoteU+0022value",
"checked": false
}
]
} Summary Sheet.json cannot handle single quotes in a concise manner, and double quotes only work with a very particular setup. Please look into this and add a fix, for the single quote as a minimum. It should be working as it is valid json and valid HTML. Quick fixes and work arounds If you want to use single quotes in your Default Sheet Settings, make sure to use a special version of the single quote, such as: ’ If you want to use double quotes in your Default Sheet Settings, make sure to use a special version or make sure to encode the double quote for your HTML , and escape the quote for your Sheet.json file