resources: Replace implicit Bugzilla bug numbers with Phab ones
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.preview.js
index 3b19b35..15d0a39 100644 (file)
                                        $( '<span>' ).addClass( 'comment' ).html(
                                                // There is no equivalent to rawParams
                                                mw.message( 'parentheses' ).escaped()
-                                                       .replace( '$1', parse.parsedsummary )
+                                                       // .replace() use $ as start of a pattern.
+                                                       // $$ is the pattern for '$'.
+                                                       // The inner .replace() duplicates any $ and
+                                                       // the outer .replace() simplifies the $$.
+                                                       .replace( '$1', parse.parsedsummary.replace( /\$/g, '$$$$' ) )
                                        )
                                );
                        }
 
                // This should be moved down to '#editform', but is kept on the body for now
                // because the LiquidThreads extension is re-using this module with only half
-               // the EditPage (doesn't include #editform presumably, bug 55463).
+               // the EditPage (doesn't include #editform presumably, T57463).
                $( document.body ).on( 'click', '#wpPreview, #wpDiff', doLivePreview );
        } );