fix replaceAll()

This function will never return if new_value contains old_value.
For example, old_value = "'", new_value = "''".
Merge pull request #7751 from zawasp/win32_minimize

add minimize / restore for desktop (win32, linux, mac)
[ci skip]
Merge pull request #7791 from xiangxw/fix_replaceAll

fix replaceAll()