mirror of
https://github.com/silverstripe/silverstripe-restfulserver
synced 2024-10-22 14:05:58 +02:00
Sanitize classname for has_one relations
Sanitize the classname for has_one relations in XMLDataFormatter, to not break the XML and make the relation link work.
This commit is contained in:
parent
3da21bb6c2
commit
3153f4d30a
@ -148,6 +148,8 @@ class XMLDataFormatter extends DataFormatter
|
|||||||
if (!singleton($relClass)->stat('api_access')) {
|
if (!singleton($relClass)->stat('api_access')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// backslashes in FQCNs kills both URIs and XML
|
||||||
|
$relClass = $this->sanitiseClassName($relClass);
|
||||||
|
|
||||||
// Field filtering
|
// Field filtering
|
||||||
if ($fields && !in_array($relName, $fields)) {
|
if ($fields && !in_array($relName, $fields)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user