Fixed replaceInternalPageLinks converting 0 or another falsey value to "".
Thanks to tamtt on the forums!