diff --git a/src/IDF/Template/Markdown.php b/src/IDF/Template/Markdown.php new file mode 100644 index 0000000..b3d37f3 --- /dev/null +++ b/src/IDF/Template/Markdown.php @@ -0,0 +1,102 @@ +go($mdtext))); +} + +/** + * Strict class to only allow entities. + */ +class IDF_Template_Markdown extends Pluf_Text_HTML_Filter +{ + public $allowed = array(); + public $always_close = array(); + public $remove_blanks = array(); + public $allowed_entities = array( + 'amp', + 'gt', + 'lt', + 'quot', + 'nbsp', + 'ndash', + 'rdquo', + 'ldquo', + 'Alpha', + 'Beta', + 'Gamma', + 'Delta', + 'Epsilon', + 'Zeta', + 'Eta', + 'Theta', + 'Iota', + 'Kappa', + 'Lambda', + 'Mu', + 'Nu', + 'Xi', + 'Omicron', + 'Pi', + 'Rho', + 'Sigma', + 'Tau', + 'Upsilon', + 'Phi', + 'Chi', + 'Psi', + 'Omega', + 'alpha', + 'beta', + 'gamma', + 'delta', + 'epsilon', + 'zeta', + 'eta', + 'theta', + 'iota', + 'kappa', + 'lambda', + 'mu', + 'nu', + 'xi', + 'omicron', + 'pi', + 'rho', + 'sigmaf', + 'sigma', + 'tau', + 'upsilon', + 'phi', + 'chi', + 'psi', + 'omega', + 'thetasym', + 'upsih', + 'piv', + ); +} diff --git a/src/IDF/conf/idf.php-dist b/src/IDF/conf/idf.php-dist index d59cf8b..125506b 100644 --- a/src/IDF/conf/idf.php-dist +++ b/src/IDF/conf/idf.php-dist @@ -83,6 +83,7 @@ $cfg['template_tags'] = array( ); $cfg['template_modifiers'] = array( 'size' => 'IDF_Views_Source_PrettySize', + 'markdown' => 'IDF_Template_Markdown_filter', ); diff --git a/src/IDF/templates/project-home.html b/src/IDF/templates/project-home.html index 53b3381..6ceccb5 100644 --- a/src/IDF/templates/project-home.html +++ b/src/IDF/templates/project-home.html @@ -1,4 +1,5 @@ {extends "base.html"} +{block docclass}yui-t2{/block} {block tabhome} class="active"{/block} {block subtabs}