made getstring respect the tag boundary