Skip to content

Commit c00de1b

Browse files
committed
Merge branch 'integration'
2 parents 3cbe0aa + 171dfd9 commit c00de1b

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

extension.driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private function buildParams()
144144
'this-month' => $date->format('m'),
145145
'this-day' => $date->format('d'),
146146
'timezone' => $date->format('P'),
147-
'website-name' => Symphony::Configuration()->get('sitename', 'general'),
147+
'website-name' => General::sanitize(Symphony::Configuration()->get('sitename', 'general')),
148148
'root' => URL,
149149
'workspace' => URL . '/workspace',
150150
'http-host' => HTTP_HOST,
@@ -168,7 +168,7 @@ private function buildEntry($handle = 'reflection-field', $entry)
168168

169169
// Section context
170170
$section_data = SectionManager::fetch($entry->get('section_id'));
171-
$section = new XMLElement('section', $section_data->get('name'));
171+
$section = new XMLElement('section', General::sanitize($section_data->get('name')));
172172
$section->setAttribute('id', $entry->get('section_id'));
173173
$section->setAttribute('handle', $section_data->get('handle'));
174174

extension.meta.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
</author>
1919
</authors>
2020
<releases>
21+
<release version="2.0.5" date="2021-01-11" min="2.3" max="2.x.x">
22+
- Fix error with ampersands in website- and section-names [#42](https://github.com/symphonists/reflectionfield/issues/42)
23+
</release>
2124
<release version="2.0.4" date="2018-06-02" min="2.3" max="2.x.x">
2225
- Fix XPath-expressions [#35](https://github.com/symphonists/reflectionfield/issues/35)
2326
</release>

readme.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@ When saving an entry Reflection field creates an internal `data` structure simil
99

1010
```xml
1111
<data>
12-
<params>
13-
<today>2016-08-02</today>
14-
<current-time>12:34</current-time>
15-
<this-year>2016</this-year>
16-
<this-month>08</this-month>
17-
<this-day>02</this-day>
18-
<timezone>+02:00</timezone>
19-
<website-name>Example Website</website-name>
20-
<root>https://example.com</root>
21-
<workspace>https://example.com/workspace</workspace>
22-
<http-host>example.com</http-host>
23-
<upload-limit>5242880</upload-limit>
24-
<symphony-version>2.7.0</symphony-version>
25-
</params>
26-
<reflection-field-handle>
27-
<section id="" handle="">…</section>
28-
<entry id="">
29-
<field-one>…</field-one>
30-
<field-two>
31-
<item handle="">…</item>
32-
<item handle="">…</item>
33-
</field-two>
34-
<system-date>
35-
<created iso="" timestamp="" time="" weekday="" offset="">…</created>
36-
<modified iso="" timestamp="" time="" weekday="" offset="">…</modified>
37-
</system-date>
38-
</entry>
39-
</reflection-field-handle>
12+
<params>
13+
<today>2021-01-12</today>
14+
<current-time>20:34</current-time>
15+
<this-year>2021</this-year>
16+
<this-month>01</this-month>
17+
<this-day>12</this-day>
18+
<timezone>+02:00</timezone>
19+
<website-name>Example Website</website-name>
20+
<root>https://example.com</root>
21+
<workspace>https://example.com/workspace</workspace>
22+
<http-host>example.com</http-host>
23+
<upload-limit>5242880</upload-limit>
24+
<symphony-version>2.7.10</symphony-version>
25+
</params>
26+
<reflection-field-handle>
27+
<section id="" handle="">…</section>
28+
<entry id="">
29+
<field-one>…</field-one>
30+
<field-two>
31+
<item handle="">…</item>
32+
<item handle="">…</item>
33+
</field-two>
34+
<system-date>
35+
<created iso="" timestamp="" time="" weekday="" offset="">…</created>
36+
<modified iso="" timestamp="" time="" weekday="" offset="">…</modified>
37+
</system-date>
38+
</entry>
39+
</reflection-field-handle>
4040
</data>
4141
```
4242

0 commit comments

Comments
 (0)