It is reported from Imam al-Sha'bi (may Allah have mercy on him) that he said: We were reciting poetry near the House of Allah (the Ka'bah). Ibn al-Zubayr (may Allah be pleased with him) came to us and said: Are you reciting poetry in the Sanctuary of Allah and beside the House of Allah? Then a Companion from the Ansar who was with us said: O Ibn al-Zubayr, there is no harm, as long as you do not corrupt yourself, for the Prophet (peace and blessings be upon him) "used to forbid only that poetry whose subject is women and on which wealth is spent."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21141