Proposition (divisibility of polynomials in UFD and its field of fractions)
Let $R$ be a unique factorisation domain and $F$ be its field of fractions.
For a primitive polynomial $g\in R[X]$, a polynomial $f\in R[X]$ is divisible by $g$ in $R[X]$ iff it is divisible by $g$ in $F[X]$.
Equivalently, if $J=(g)\lhd R[X]$ and $I=(g)\lhd F[X]$, then $J = I \cap R[X]$.