Skip to content

Commit

Permalink
let export_html, export_htmlns work consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
Klap-in committed Jul 19, 2023
1 parent 4e6be35 commit 0ed7a96
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions action/export.php
Expand Up @@ -29,11 +29,15 @@ public function register(Doku_Event_Handler $controller) {
* @param Event $event
*/
public function renameDoExportNSAction(Event $event) {
// our event?
$allowedEvents = ['export_htmlns', 'export_textns'];
if(!in_array($event->data, $allowedEvents)) return;
if(in_array($event->data, $allowedEvents)) {
$event->data = substr($event->data, 0, -2);
}

$event->data = substr($event->data, 0, -2); // remove ns from name
//export_xhtml is built-in xhtml export with header
if($event->data === 'export_html') { // also act_clean() does this rename
$event->data = 'export_xhtml';
}
}

/**
Expand Down

0 comments on commit 0ed7a96

Please sign in to comment.