<?php
/*=========================================================================
 Midas Server
 Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
 All rights reserved.
 For more information visit http://www.kitware.com/.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0.txt

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
=========================================================================*/

/** Markdown view helper. */
class Zend_View_Helper_Markdown extends Zend_View_Helper_Abstract
{
    /**
     * Markdown view helper.
     *
     * @param string $text Markdown or Markdown Extra text
     * @return string HTML text
     */
    public function markdown($text)
    {
        return UtilityComponent::markdown(htmlspecialchars($text, ENT_QUOTES, 'UTF-8'));
    }
}

<?php
/*=========================================================================
 Midas Server
 Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
 All rights reserved.
 For more information visit http://www.kitware.com/.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0.txt

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
=========================================================================*/

/** Markdown view helper. */
class Zend_View_Helper_Markdown extends Zend_View_Helper_Abstract
{
    /**
     * Markdown view helper.
     *
     * @param string $text Markdown or Markdown Extra text
     * @return string HTML text
     */
    public function markdown($text)
    {
        return UtilityComponent::markdown(htmlspecialchars($text, ENT_COMPAT, 'UTF-8'));
    }
}

Fix overzealous escaping of markdown input
Fix overzealous escaping of markdown input

Fixes  #104.
