There's a recipe for homemade vinegar that's basically water, brown sugar, and pineapple peels. Is this safe? I'm thinking that there'll be some mold, etc. or even methanol.
Yeast eats sugar and makes alcohol,
Acetobacters eat alcohol and make acetic acid which is vinegar.
Both alcohol and acetic acid inhibit other microbes. Once your solution is alcoholic or acidic enough there is no risk of mold.
However- this recipe does not include any yeast or acetobacters, it relies on getting the necessary microbes from the air and the surface of the pineapple. During that initial period there will be a risk of some other microbe taking over and spoiling the batch.
Personally I would take out a little insurance and include a pinch of yeast in the initial mix.
If you have an old bottle of undistilled vinegar around you might have a colony of acetobacters (called a "mother") growing in it already. This wouldn't be necessary to prevent spoilage but would speed up your vinegar production greatly. You would add a piece of the mother after most of the sugar had been converted to alcohol. After your first batch you could use the mother in future batches.
This sounds like an awesome experiment and I'm going to have to try making some as well.
The relevant component of vinegar is acetic acid, which is a byproduct produced by certain bacteria when they consume ethanol, and ethanol is a byproduct formed when certain yeasts consume sugar.
Looking the recipe you link, I'd assume that some of the sugars in the mixture ferment into ethanol, which is then consumed and broken down to acetic acid. After this, there may be some ethanol left (the nicer kind of alcohol you'd find in wine etc), but you will absolutely not find any methanol since yeast doesn't produce methanol.
As for mould (and most other microbes), your vinegar-in-the-making would be a pretty hostile environment, with low pH, possibly some ethanol, and an already present culture of yeast and/or vinegar bacteria. Fact is, you can use vinegar to kill off mould.
When making fermented beverages such as wine, beer or cider, hygiene is very important, but not so much for safety, it's more about taste.
So your vinegar should be safe. If it tastes OK, congratulations, you did it! As always, though, if you intend to keep it for a while, you may want to pasteurize it (or freeze it).