[icinga-checkins] icinga.org: icinga-web/r1.7: Bugfix for html entities in cronk params

git at icinga.org git at icinga.org
Fri Oct 5 11:24:04 CEST 2012


Module: icinga-web
Branch: r1.7
Commit: b71632afb56254525c3be61f8885e9b224c8b8bb
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=b71632afb56254525c3be61f8885e9b224c8b8bb

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Oct  5 09:58:58 2012 +0200

Bugfix for html entities in cronk params

Needed for the cronk builder, fixes #2597

Conflicts:

	app/modules/Cronks/models/Provider/CronksDataModel.class.php

---

 .../models/Provider/CronksDataModel.class.php      |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/app/modules/Cronks/models/Provider/CronksDataModel.class.php b/app/modules/Cronks/models/Provider/CronksDataModel.class.php
index 2619a7e..d7e4264 100644
--- a/app/modules/Cronks/models/Provider/CronksDataModel.class.php
+++ b/app/modules/Cronks/models/Provider/CronksDataModel.class.php
@@ -450,7 +450,11 @@ class Cronks_Provider_CronksDataModel extends CronksBaseModel implements AgaviIS
                 if (is_array($value)) {
 
                     foreach($value as $sn=>$sv) {
-                        $se = $dom->createElement('ae:parameter', $sv);
+                        // To avoid "unterminated entity reference" warnings /
+                        // exceptions, putt all into cdata section
+                        $cdata = $dom->createCDATASection($sv);
+                        $se = $dom->createElement('ae:parameter');
+                        $se->appendChild($cdata);
                         $se->setAttribute('name', $sn);
                         $ele->appendChild($se);
                     }





More information about the icinga-checkins mailing list