Fixed incorrect replacement of <button> tags
Updated fix for button element and added test cases