Updated bbcodify so it's not dependent on the location bar necessarily being there