I think it was when they travelled back in the 16th century, in the Shakespeare episode: the Doctor was talking about Harry Potter with Martha (because of the sorceress). And in the end Martha makes Shakespeare pronounce "Expelliarmus" !
I added this quote because it was about books. I might have chosen another one, maybe from The Library episodes... I can't remember if he says something about the power of books in the episode with the werewolf, when they're trapped in the library of the mansion... anyway !