Hello Frank,
I have done this, but there are precautions you must take.
When a battery is charged it can produce hydrogen gas that in the right concentrations is highly explosive. Inside the boot of car, there is no natural ventilation, so it must be provided. Using a plastic box with a close fitting lid to contain the battery, and arranging for a plastic pipe to vent any excess gas to the outside is an effective method.
The box can also provide the security to prevent the battery from moving around or tipping, also if there is and acid spill it is contained in the box.
When charging a leisure or a car type battery the current needed can be quite high (10A or more) This is too much for a cigar lighter socket, and can cause them to over heat and melt. You must use a more robust contact, and the 12S towing socket is designed for this and is far better.
Check that the charging cable and gas vent pipe can pass through the boot lid or tail-gate seal without damage. They should also be no longer than necessary to prevent snagging on any passing objects or dragging on the road.
For safety both the positive and the negative connection leads to there target battery should be fused (10A in each), and the battery connectors should be insulated to prevent unintentional short circuits if a loose lead should come into a metal part of the car.
The charging cable should be connected to the target battery before it is connected to the 12S socket on the tow-bar.