Tom Sawyer's summer was changed when he got the measels. He was sick in bed for two weeks. When he was well enougoh to go downtown he found out that all his friends had gotten religion at a revivial meeting and were therefore not up to their fun sinful ways.
In chapter 23-24 the trial of Injun Joe is going on. Just as Tom finishes his testimony, Joe attacks Tom, then leaps out of the window. Potter is freed.