We give an intrinsic characterization of the property that the zero extension of a Newtonian function, defined on an open set in a doubling metric measure space supporting a strong relative isoperimetric inequality, belongs to the Newtonian space on the entire metric space. The theory of functions of bounded variation is used extensively in the argument and we also provide a structure theorem for sets of finite perimeter under the assumption of a strong relative isoperimetric inequality. The characterization is used to prove a strong version of quasicontinuity of Newtonian functions.