
Complete church management system with bulletin management, media processing, live streaming integration, and web interface. Includes authentication, email notifications, database migrations, and comprehensive test suite.
25 lines
1.1 KiB
SQL
25 lines
1.1 KiB
SQL
-- Check the specific bulletin that the API is returning
|
|
SELECT id, title, date,
|
|
length(scripture_reading) as scripture_length,
|
|
substring(scripture_reading, 1, 200) as scripture_sample,
|
|
CASE WHEN scripture_reading LIKE '%<%' THEN 'HAS HTML' ELSE 'CLEAN' END as has_html
|
|
FROM bulletins
|
|
WHERE id = '192730b5-c11c-4513-a37d-2a8b320136a4';
|
|
|
|
-- Let's also clean this specific record if it has HTML
|
|
UPDATE bulletins
|
|
SET scripture_reading = REGEXP_REPLACE(scripture_reading, '<[^>]*>', '', 'g'),
|
|
sabbath_school = REGEXP_REPLACE(COALESCE(sabbath_school, ''), '<[^>]*>', '', 'g'),
|
|
divine_worship = REGEXP_REPLACE(COALESCE(divine_worship, ''), '<[^>]*>', '', 'g'),
|
|
sunset = REGEXP_REPLACE(COALESCE(sunset, ''), '<[^>]*>', '', 'g')
|
|
WHERE id = '192730b5-c11c-4513-a37d-2a8b320136a4'
|
|
AND (scripture_reading LIKE '%<%'
|
|
OR sabbath_school LIKE '%<%'
|
|
OR divine_worship LIKE '%<%'
|
|
OR sunset LIKE '%<%');
|
|
|
|
-- Verify after cleaning
|
|
SELECT 'After targeted cleaning:' as status;
|
|
SELECT substring(scripture_reading, 1, 200) as cleaned_content
|
|
FROM bulletins
|
|
WHERE id = '192730b5-c11c-4513-a37d-2a8b320136a4'; |