Index: trunk/extensions/QrCode/QrCode.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | $wgExtensionCredits['parserhook'][] = array( |
24 | 24 | 'path' => __FILE__, |
25 | 25 | 'name' => 'QrCode', |
26 | | - 'version' => '0.03', |
| 26 | + 'version' => '0.05', |
27 | 27 | 'author' => array( 'David Raison' ), |
28 | 28 | 'url' => 'http://www.mediawiki.org/wiki/Extension:QrCode', |
29 | 29 | 'descriptionmsg' => 'qrcode-desc' |
— | — | @@ -109,9 +109,10 @@ |
110 | 110 | global $wgTitle; |
111 | 111 | |
112 | 112 | // Check for a provided label and use the page URL as default. |
| 113 | + // Also strip all non-alphanumeric characters |
113 | 114 | if ( $label ) { |
114 | 115 | $this->_label = $label; |
115 | | - $append = '-'.$label; |
| 116 | + $append = '-'.preg_replace("/\W+/", "", $label); |
116 | 117 | } else { |
117 | 118 | $this->_label = $wgTitle->getFullURL(); |
118 | 119 | $append = ''; |