The correct answer would be:
You shouldn't pat a strange dog; sometimes they're not friendly.
The semicolon or semi-colon is a punctuation mark used in the following three cases:
<u><em>In lists that have internal commas</em></u>, to make it easier to read. For example y favorite store is having a huge sale; you can buy pants, shirts, and shoes for half price.
<u><em>Between two independent clauses</em></u>, particularly with clauses that are complex, have commas and don't have a coordinating conjunction. For example, You shouldn't pat a strange dog; sometimes they're not friendly.
<u><em>When a comma replaces a full stop in a quotation.</em></u> For example, "Is this your child?" he asked; "I found him outside".