Index: trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt |
— | — | @@ -393,7 +393,9 @@ |
394 | 394 | * } end of parser func/transclusion/template arg |
395 | 395 | */ |
396 | 396 | |
397 | | -urltext = ( t:[^'<~[{\n\rfghimnstw:\]} ]+ { return t.join(''); } |
| 397 | +urltext = ( t:[^'<~[{\n\rfghimnstw:\]} &]+ { return t.join(''); } |
| 398 | + // XXX: use general entity decode! |
| 399 | + / "&" { return "&"; } // decode ampersand in text |
398 | 400 | / urllink |
399 | 401 | // Convert trailing space into |
400 | 402 | // XXX: This should be moved to a serializer |
— | — | @@ -743,8 +745,11 @@ |
744 | 746 | |
745 | 747 | url |
746 | 748 | = proto:url_protocol |
747 | | - rest:( [^ :\]\[\n<>\x00-\x20\x7f,.] |
748 | | - / s:[.:,] !(space / eolf) { return s } )+ |
| 749 | + rest:( [^ :\]\[\n<>\x00-\x20\x7f,.&] |
| 750 | + / s:[.:,] !(space / eolf) { return s } |
| 751 | + // XXX: use general entity decode! |
| 752 | + / '&' { return '&' } |
| 753 | + / '&' )+ |
749 | 754 | { |
750 | 755 | return proto + rest.join(''); |
751 | 756 | } |