-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
afd not transcluded properly if title of page contains "$1" #1993
Comments
There's probably an |
|
Stack Overflow says the proper way to escape this is to add a dollar sign in front of every special string. So https://stackoverflow.com/a/28102904/3480193 Someone's probably written a bulletproof function for this somewhere. I imagine it'd be something like... function escapeSecondParameterOfRegexReplace( secondParameter ) {
return secondParameter.replace( /(\$(?:\d+|&))/g, '$$$1' );
} https://regex101.com/r/7yjT4v/1 Todo:
edit: here's some more special ones... https://es5.github.io/#x15.5.4.11 |
Ah here we go. https://stackoverflow.com/a/6969486/3480193 function escapeReplacement(string) {
return string.replace(/\$/g, '$$$$');
} |
We have that function in morebits: Morebits.string.safeReplace. |
or so i think?
https://en.wikipedia.org/w/index.php?title=Wikipedia:Articles_for_deletion/Log/2024_August_22&diff=prev&oldid=1241631405
The text was updated successfully, but these errors were encountered: