diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index db8178036b..20cc9ecfe0 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -21,11 +21,10 @@ class ApiVisualEditor extends ApiBase { if ( $params['paction'] === 'parse' ) { if ( $page->exists() ) { $parsed = Http::get( - // Insert slash since wgVisualEditorParsoidURL may or may not - // end in a slash. Double slashes are no problem --catrope - $parsoid . '/' . urlencode( - $wgVisualEditorParsoidPrefix . $page->getPrefixedDBkey() - ) + // Insert slash since wgVisualEditorParsoidURL does not + // end in a slash + $parsoid . '/' . $wgVisualEditorParsoidPrefix . '/' . + urlencode( $page->getPrefixedDBkey() ) ); if ( $parsed ) { diff --git a/VisualEditor.php b/VisualEditor.php index f58055c135..25882d92ad 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -11,9 +11,11 @@ /* Configuration */ // URL to the Parsoid instance +// MUST NOT end in a slash due to Parsoid bug $wgVisualEditorParsoidURL = 'http://localhost:8000'; // Interwiki prefix to pass to the Parsoid instance -$wgVisualEditorParsoidPrefix = 'localhost:'; +// Parsoid will be called as $url/$prefix/$pagename +$wgVisualEditorParsoidPrefix = 'localhost'; /* Setup */