Skip to content

Commit

Permalink
Merge pull request #262 from Islandora/DonRichards-patch-1
Browse files Browse the repository at this point in the history
As it's been weeks since approval and Diego removed his block, and since we have no better suggestions coming in, I'm going to merge this. If someone has a strong objection when it gets into the wild, we can talk about reverting, but having a fix that doesn't address all possible cases is better than not fixing at all.
  • Loading branch information
bondjimbond authored Jan 22, 2020
2 parents 5b2bac7 + d3b4129 commit 970401a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/XMLDocument.inc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class XMLDocument {
$document = $this->createDOMDocument();
// Load from XML or create the root node.
isset($xml) ?
$document->loadXML($xml) :
$document->loadXML(islandora_sanitize_input_for_valid_xml($xml)) :
$document->appendChild(new DOMElement($root_name, NULL, $namespaces->getDefaultURI()));
$this->namespaces->addNamespacesAttributesTo($document->documentElement);
return $document;
Expand Down
2 changes: 1 addition & 1 deletion api/XMLFormProcessor.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class XMLFormProcessAction {
public function __construct(ActionInterface $action, FormElement $element, $value = NULL) {
$this->action = $action;
$this->element = $element;
$this->value = $value;
$this->value = islandora_sanitize_input_for_valid_xml($value);
}

/**
Expand Down
1 change: 1 addition & 0 deletions builder/includes/datastream.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function xml_form_builder_datastream_form_metadata_form(array $form, array &$for
$form['update'] = array(
'#type' => 'submit',
'#value' => t('Update'),
'#suffix' => '<div class="updatewarning"><span class="warning" title="Warning">' . t('All hidden characters will be filtered and not saved.') . '</span></div>',
'#name' => 'update',
'#submit' => array('xml_form_builder_datastream_form_metadata_form_submit'),
);
Expand Down

0 comments on commit 970401a

Please sign in to comment.