IWT: I could not find any process that answered under the names "zenfolio" or "yahoo".
ferrarr: I will certainly try that, as it looks very useful. I have no software to protect from malaware in my Mac.
BUT... I found the solution! Doing lots of searches in google, playing with the search terms, eventually I found someone who had the answer.
Go Mackintosh HD--- Users--- my name--- Library---safari--- Databases. There I found the following:
A folder called "_IndexedDB"
A folder "Zenfolio"
A folder "Yahoo"
Three files: Databases.db, Databases.db-shm, Databases.db-wal
I deleted both offending folders. Yahoo went completely from Safari, did not come back. But zenfolio, although there was no folder of that name anymore in the "Databases" folder, kept coming back. So I deleted all files and folders in the "Databases" folder (if some disaster happened, I could put them back). This cured the problem, zenfolio also disappeared from the Security tab. The folder called "_IndexedDB" is now back, and contains zero bytes (when before being deleted contained 6 bytes).
Safari works as usual.
I have to thank all the people that replied and gave me suggestions. I have only recently joined this forum, and I am very impressed by the quick responses, and the interest shown. Many thanks.