Skip to content

Commit

Permalink
New Textile class, bugfix Textile ampersands are not set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
olafgleba committed May 27, 2012
1 parent 58cc185 commit d7257fc
Show file tree
Hide file tree
Showing 2 changed files with 545 additions and 195 deletions.
Expand Up @@ -14,7 +14,7 @@
* This file is licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE v3
* http://www.opensource.org/licenses/agpl-v3.html
*
* @author Andreas Ahlenstorf
* @author Andreas Ahlenstorf, Olaf Gleba
* @package Welcompose_Plugins
* @license http://www.opensource.org/licenses/agpl-v3.html GNU AFFERO GENERAL PUBLIC LICENSE v3
*/
Expand Down Expand Up @@ -82,8 +82,21 @@ public function apply ($str)
}
$TEXTILE = new Textile();

// Since the current textile converter class has a problem
// with supplied ampersands, we cannot use the usual approach.
// Instead of simply passing the string to the TextileThis method and
// return it in a single line we must do a string replace before
// returning the string.

// Usual approach
// apply textile
return $TEXTILE->TextileThis($str);
//return $TEXTILE->TextileThis($str);

// Temporary approach
$str = $TEXTILE->TextileThis($str);
$str = str_replace('&', '&', $str);

return $str;
}

}
Expand Down

0 comments on commit d7257fc

Please sign in to comment.