ajax.php
changeset 1108 c1be67a50d81
parent 1103 90225c988124
child 1161 9c0c519066ac
equal deleted inserted replaced
1107:2d37a11fabd8 1108:c1be67a50d81
    73           'allow_wysiwyg' => $auth_wysiwyg,
    73           'allow_wysiwyg' => $auth_wysiwyg,
    74           'revid' => $revid,
    74           'revid' => $revid,
    75           'have_draft' => false
    75           'have_draft' => false
    76         );
    76         );
    77       
    77       
    78       $return['page_format'] = $paths->cpage['page_format'];
    78       $return['page_format'] = $page->ns->cdata['page_format'];
    79       if ( $return['page_format'] == 'xhtml' )
    79       if ( $return['page_format'] == 'xhtml' )
    80       {
    80       {
    81         // gently process headings to make tinymce format them correctly
    81         // gently process headings to make tinymce format them correctly
    82         if ( preg_match_all('/^ *?(={1,6}) *(.+?) *\\1 *$/m', $return['src'], $matches) )
    82         if ( preg_match_all('/^ *?(={1,6}) *(.+?) *\\1 *$/m', $return['src'], $matches) )
    83         {
    83         {
   489         break;
   489         break;
   490       }
   490       }
   491       switch($_GET['to'])
   491       switch($_GET['to'])
   492       {
   492       {
   493         case 'xhtml':
   493         case 'xhtml':
   494           $result = RenderMan::render($_POST['text'], RENDER_WIKI_DEFAULT | RENDER_BLOCKONLY);
   494           $result = RenderMan::render($_POST['text'], RENDER_BLOCK | RENDER_NOSMILIES, false);
   495           break;
   495           break;
   496         case 'wikitext':
   496         case 'wikitext':
   497           $result = RenderMan::reverse_render($_POST['text']);
   497           $result = RenderMan::reverse_render($_POST['text']);
   498           break;
   498           break;
   499         default:
   499         default: