Discuss and learn French: French vocabulary, French grammar, French culture etc.
Literally it would be "Mieux le diable qu'on connait que celui qu'on connait pas" but that idiom doesn't exist as such. Maybe the closest is "de deux maux, choisir le moindre" -- which simply means take the lesser of two evils.
You could also say: Mieux vaut un ennemi que tu connais que celui que tu ne connais pas (or, more formally, ...que l'on connaît...).
Should qu'on in my version have been que l'on? If so, why please?
Yes, in "proverb grammar" (and formal French in general), it would be more usual to put "que l'on". And as in my example, "Mieux vaut..." at the start would be more French, I think.