And then the Republicans shifted to the Southern strategy and instead started exploiting racial tensions (those are the words of George W. Bush's campaign manager, by the way, not my characterization) instead of working to ease them.
Yes, the Republican party was at one time the party of anti-slavery and civil rights. That has not been the case for many years now, however.