Open-CSP / FlexForm

MediaWiki extensions : HTML5 Form renderer
https://www.mediawiki.org/wiki/Extension:FlexForm
5 stars 4 forks source link

Remove leading slash from smwQueryUrl #30

Closed Bovine-collab closed 1 year ago

Bovine-collab commented 1 year ago

When 'wgScriptPath' is set, this already includes a leading slash. For instance, the default value is '/wiki'. With the old logic in place, this would result in calling '//index.php/Special:FlexForm' - which fails to load any result. Removing the leading slash fixes it.

Designburo commented 1 year ago

Hi! Thanks for this, however for us that is not the case ( we do not have a leading trailing slash). I'd rather have a ltrim for the "/". Something like$smwQueryUrl = "/" . ltrim( $wgScriptPath, '/' ) . '/index.php/Special:FlexForm';