I am reading The Life & Glories of Saint Joseph, by Edward Healy Thompson, which was first published in 1888. At the start of Chapter VII, in which the argument is made that Joseph was born without original sin (related, but not identical to how Mary was immaculately conceived), he says this:
From Holy Scripture we also learn that some souls through divine predilection, as those of Jeremias [a.k.a. Jeremiah] and [John] the Baptist, were sanctified before they saw the light of day.
Unfortunately, Thompson doesn’t explain which parts of Holy Scripture he is referring to and seems to assume that the reader already knows.
What is the biblical basis that Jeremiah and John the Baptist were sanctified before birth (i.e. born without original sin)?