Suppose that N1 and N2 are closed smooth manifolds of dimension n that are homeomorphic. We prove that the spaces of smooth knots Emb(S1,N1) and Emb(S1,N2) have the same homotopy (2n−7)-type. In the 4-dimensional case this means that the spaces of smooth knots in homeomorphic 4-manifolds have sets π0 of components that are in bijection, and the corresponding path components have the same fundamental groups π1. The result about π0 is well-known and elementary, but the result about π1 appears to be new. The result gives a negative partial answer to a question of Oleg Viro. Our proof uses the Goodwillie-Weiss embedding tower. We give a new model for the quadratic stage of the Goodwillie-Weiss tower, and prove that the homotopy type of the quadratic approximation of the space of knots in N does not depend on the smooth structure on N. Our results also give a lower bound on π2Emb(S1,N). We use our model to show that for every choice of basepoint, each of the homotopy groups π1 and π2 of Emb(S1,S1×S3) contains an infinitely generated free abelian group.