${ converts to ${
And the bug occurs when the special replacement pattern$& (that inserts the matched substring) is passed to the second argument of the replace method (which is inside while loop) on this line:
bbdata = bbdata.replace(am[0],nhtml);
But when specifying a function as second parameter in replace method, replacement patterns will not apply.
${
converts to${
And the bug occurs when the special replacement pattern$&
(that inserts the matched substring) is passed to the second argument of thereplace
method (which is inside while loop) on this line:bbdata = bbdata.replace(am[0],nhtml);
But when specifying a function as second parameter inreplace
method, replacement patterns will not apply.