Black spots on onions are usually caused by fungus and are safe only if limited to the outer skin. If the spots reach the flesh or the onion smells or feels bad, it should be thrown away.
Do you want to be informed everytime with our latest news?