Better deal with strings in Templates
|Assignee:||Ruben S. Montero||% Done:|
|Category:||Core & System|
|Target version:||Release 1.4|
Right now quote are escaped in an awkward way, by using single quotes if you need doubles and vice versa. This also cause problems when inserting data in the sqlite, as single quotes are also used to delimit fields.
A better quote escape mechanism or semantics is needed.
#1 Updated by Ruben S. Montero almost 10 years ago
An example of this behavior (submitted by Shyng-Yi Shu), when thw following is included in the template:
RAW = [type="xen",data="builder = 'hvm'"]
The vector value in data: "builder = 'hvm'", the hvm must has single
quotation marks like 'hvm', but OpneNebula complain in log and failed
"SQL command was: INSERT OR REPLACE INTO vm_attributes (id,name,type,value) VALUES (7,'RAW',1,'DATA=builder = 'hvm'@^_^@TYPE=xen'), error: near "hvm": syntax error"