|
1 | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
2 | 2 | <Package |
3 | 3 | UpgradeCode="{{ cookiecutter.guid }}" |
4 | | - Name="{{ cookiecutter.formal_name }}" |
| 4 | + Name="{{ cookiecutter.formal_name|xml_escape }}" |
5 | 5 | Version="{{ cookiecutter.version_triple }}" |
6 | | - Manufacturer="{{ cookiecutter.author or 'Anonymous' }}" |
| 6 | + Manufacturer="{{ (cookiecutter.author or 'Anonymous')|xml_escape }}" |
7 | 7 | Language="1033" |
8 | 8 | Scope="{{ 'perUserOrMachine' if 'User' in cookiecutter.install_scope else 'perMachine' }}"> |
9 | 9 | <!-- See scope comments below --> |
10 | 10 |
|
11 | 11 | <Media Id="1" Cabinet="product.cab" EmbedCab="yes" /> |
12 | 12 |
|
13 | | - <Icon Id="ProductIcon" SourceFile="{{ cookiecutter.formal_name }}/icon.ico" /> |
| 13 | + <Icon Id="ProductIcon" SourceFile="{{ cookiecutter.formal_name|xml_escape }}/icon.ico" /> |
14 | 14 |
|
15 | 15 | <!-- Add/Remove Programs settings --> |
16 | 16 | <Property Id="ARPPRODUCTICON" Value="ProductIcon" /> |
17 | 17 | {% if cookiecutter.url -%} |
18 | | - <Property Id="ARPURLINFOABOUT" Value="{{ cookiecutter.url }}" /> |
| 18 | + <Property Id="ARPURLINFOABOUT" Value="{{ cookiecutter.url|xml_escape }}" /> |
19 | 19 | {% endif -%} |
20 | 20 | {% if cookiecutter.author_email -%} |
21 | 21 | <Property Id="ARPCONTACT" Value="{{ cookiecutter.author_email }}" /> |
|
34 | 34 | depending on the values of the ALLUSERS and MSIINSTALLPERUSER properties. --> |
35 | 35 | <StandardDirectory Id="ProgramFiles64Folder"> |
36 | 36 | {%- if cookiecutter.use_full_install_path %} |
37 | | - <Directory Name="{{ cookiecutter.author or 'Unknown Developer' }}"> |
| 37 | + <Directory Name="{{ (cookiecutter.author or 'Unknown Developer')|xml_escape }}"> |
38 | 38 | {%- endif %} |
39 | | - <Directory Id="INSTALLFOLDER" Name="{{ cookiecutter.formal_name }}" /> |
| 39 | + <Directory Id="INSTALLFOLDER" Name="{{ cookiecutter.formal_name|xml_escape }}" /> |
40 | 40 | {%- if cookiecutter.use_full_install_path %} |
41 | 41 | </Directory> |
42 | 42 | {%- endif %} |
|
46 | 46 | <!-- "\\?\" enables long paths (https://github.com/wixtoolset/issues/issues/9115). --> |
47 | 47 | <Files |
48 | 48 | Directory="INSTALLFOLDER" |
49 | | - Include="\\?\{{ cookiecutter.package_path }}\**" /> |
| 49 | + Include="\\?\{{ cookiecutter.package_path|xml_escape }}\**" /> |
50 | 50 | </ComponentGroup> |
51 | 51 |
|
52 | 52 | <StandardDirectory Id="ProgramMenuFolder"> |
53 | | - <Directory Id="ProgramMenuSubfolder" Name="{{ cookiecutter.formal_name }}"> |
| 53 | + <Directory Id="ProgramMenuSubfolder" Name="{{ cookiecutter.formal_name|xml_escape }}"> |
54 | 54 | <Component Id="ApplicationShortcuts"> |
55 | 55 | <Shortcut |
56 | 56 | Id="ApplicationShortcut1" |
57 | | - Name="{{ cookiecutter.formal_name }}" |
| 57 | + Name="{{ cookiecutter.formal_name|xml_escape }}" |
58 | 58 | Icon="ProductIcon" |
59 | 59 | Description="{{ cookiecutter.description | truncate(256, False) }}" |
60 | 60 | Target="[INSTALLFOLDER]{{ cookiecutter.binary_path }}" /> |
61 | 61 | <RegistryValue |
62 | 62 | Root="HKMU" |
63 | | - Key="Software\{{ cookiecutter.author or 'Unknown Developer' }}\{{ cookiecutter.formal_name }}" |
| 63 | + Key="Software\{{ (cookiecutter.author or 'Unknown Developer')|xml_escape }}\{{ cookiecutter.formal_name|xml_escape }}" |
64 | 64 | Name="installed" |
65 | 65 | Type="integer" |
66 | 66 | Value="1" |
|
81 | 81 | Id="FileAssociation.{{ document_type_id }}" |
82 | 82 | Directory="INSTALLFOLDER"> |
83 | 83 | <File |
84 | | - Id="ProductIcon.{{ document_type_id }}" |
85 | | - Source="{{ cookiecutter.app_name }}-{{ document_type_id }}.ico" /> |
| 84 | + Id="ProductIcon.{{ document_type_id|xml_escape }}" |
| 85 | + Source="{{ cookiecutter.app_name }}-{{ document_type_id|xml_escape }}.ico" /> |
86 | 86 | <ProgId |
87 | | - Id="{{ cookiecutter.bundle }}.{{ cookiecutter.app_name }}.{{ document_type_id }}" |
88 | | - Description="{{ document_type.description }}" |
| 87 | + Id="{{ cookiecutter.bundle }}.{{ cookiecutter.app_name }}.{{ document_type_id|xml_escape }}" |
| 88 | + Description="{{ document_type.description|xml_escape }}" |
89 | 89 | Icon="ProductIcon.{{ document_type_id }}"> |
90 | 90 | <Extension |
91 | 91 | Id="{{ document_type.extension }}" |
92 | | - ContentType="{% if document_type.get('mime_type') %}{{ document_type.mime_type }}{% else %}application/x-{{ cookiecutter.app_name }}-{{ document_type_id }}{% endif %}"> |
| 92 | + ContentType="{% if document_type.get('mime_type') %}{{ document_type.mime_type|xml_escape }}{% else %}application/x-{{ cookiecutter.app_name }}-{{ document_type_id }}{% endif %}"> |
93 | 93 | <Verb |
94 | 94 | Id="open" |
95 | 95 | Command="Open" |
|
0 commit comments