var audioPlaylist = new Playlist("1", [
lyrics: "#ReplaceNoCase( getPlayList.track_lyrics, chr( 13 )&chr( 10 ), '<br />', 'all')#"
<cfif getPlayList.CurrentRow lt getPlayList.RecordCount>,</cfif>
The plugin I’m using doesn’t support any HTML formating and I was adviced to use my serverside scripting to return line breaks and for converting any HTML special characters. As you can see do I use ReplaceNoCase, but instead of returning the actual line breaks, The <cfoutput> gives me the line break characters instead like <br /> <br /> .
Thank you in advance
try it like this –
<!--- first make Windows style into Unix style --->
<CFSET variables.lyrics = REPLACE(getPlayList.track_lyrics,chr(13)&chr(10),chr(10),"ALL")>
<!--- now make Macintosh style into Unix style --->
<CFSET variables.lyrics = REPLACE(variables.lyrics,chr(13),chr(10),"ALL")>
<!--- now change breaks to BR tags --->
<CFSET variables.lyrics = REPLACE(variables.lyrics ,chr(10),"<br>","ALL")>
Hi Rudy. It keeps giving me the <br> characters? I presume I had to place those <cfset’s> within the <cfoutput>?
for the good order this is insert:
INSERT INTO `release_tracks` (`track_id`, `release_id`, `track_name`, `track_lyrics`, `track_file`) VALUES
(1, 1, 'Hopesong', 'Song 1\\r\
lijn 3', '01 Hopesong.mp3');
um, yeah, because the first CFSET uses getPlayList.track_lyrics
note you will be printing #variables.lyrics# after the CFSETs