The real Rapunzel wasn't just a beautiful woman locked in a tower – she was a literal saint. Or, at least one of the early inspirations for the folktale that would become Rapunzel was. The actual story is even darker than the Grimm Brothers version, in which the prince seduces Rapunzel instead of saving her. Just like the true story behind Snow White and the Seven Dwarfs, Disney had to change a lot in the Rapunzel story before turning it out as a children's film.
Saint Barbara was the daughter of a rich Roman merchant in the third century. Her own father locked her into a tower so that she wouldn't convert to Christianity, but Barbara found a way. She also resisted marriage, just like the Christian saints who protected their virginity with some extreme measures. But as a punishment for her faith, Barbara's pagan father grabbed her by the hair and beheaded her.
The links between Saint Barbara and Rapunzel go beyond both being locked in towers. Like Saint Barbara, Rapunzel was an independent woman who refused to listen to authority. But luckily for Rapunzel, she didn't suffer the same gruesome fate as the stories that were inspirations for Rapunzel.