what is use for CRLF in HTLM ?

what is use for CRLF in HTLM ?

Postby Jimmy » Wed Sep 07, 2022 9:15 pm

hi

i do have use
Code: Select all  Expand view
 cMemo := STRTRAN( cMemo, CHR( 10 ), CRLF )

when "strip" more HTML CODE i might have use wrong sign so CODE is not "formatted" and all can be in "one line"
Code: Select all  Expand view
PROCEDURE StripCodeTag( cCode )
   //  change HTML in CODE
   cCode := STRTRAN( cCode, "<br /><br />", CRLF )
   cCode := STRTRAN( cCode, "<br />", " " )
   cCode := STRTRAN( cCode, '&#123;', "{" )
   cCode := STRTRAN( cCode, '&#125;', "}" )
   cCode := STRTRAN( cCode, "&lt;", CHR( 34 ) )                       // "<" )
   cCode := STRTRAN( cCode, "&gt;", CHR( 34 ) )                       // ">" )
   cCode := STRTRAN( cCode, '&#40;', "(" )
   cCode := STRTRAN( cCode, '&#41;', ")" )
   cCode := STRTRAN( cCode, '&#91;', "[" )
   cCode := STRTRAN( cCode, '&#93;', "]" )
   cCode := STRTRAN( cCode, '&amp;', "&" )

   cCode := STRTRAN( cCode, "&nbsp;", " " )
   cCode := STRTRAN( cCode, 'ÿ', " " )
   cCode := STRTRAN( cCode, "&quot;", '"' )

   cCode := STRTRAN( cCode, '<span', "" )
   cCode := STRTRAN( cCode, '#0000FF', "" )
   cCode := STRTRAN( cCode, '#BF0040', "" )
   cCode := STRTRAN( cCode, '#00C800', "" )
   cCode := STRTRAN( cCode, '#000000', "" )
   cCode := STRTRAN( cCode, '#B900B9', "" )
   cCode := STRTRAN( cCode, '#ff0000', "" )
   cCode := STRTRAN( cCode, '#0000ff', "" )
   cCode := STRTRAN( cCode, '#00D7D7', "" )
   cCode := STRTRAN( cCode, ';">', "" )
   cCode := STRTRAN( cCode, '</span>', "" )
   cCode := STRTRAN( cCode, '</div>', "" )
   cCode := STRTRAN( cCode, 'style="color:', "" )

RETURN


Result from Sample https://forums.fivetechsupport.com/viewtopic.php?t=42143 Message 13

LOCAL aProperty :=  {
;  "AcceleratorCapabilities",;  "AdapterCompatibility",;  "AdapterDACType",;  "AdapterRAM",;  "Availability",;  "CapabilityDescriptions",;  "Caption",;  "ColorTableEntries",;  "ConfigManagerErrorCode",;  "ConfigManagerUserConfig",;  "CreationClassName",;  "CurrentBitsPerPixel",;  "CurrentHorizontalResolution",;  "CurrentNumberOfColors",;  "CurrentNumberOfColumns",;  "CurrentNumberOfRows",;  "CurrentRefreshRate",;  "CurrentScanMode",;  "CurrentVerticalResolution",;  "Description",;  "DeviceID",;  "DeviceSpecificPens",;  "DitherType",;  "DriverDate",;  "DriverVersion",;  "ErrorCleared",;  "ErrorDescription",;  "ICMIntent",;  "ICMMethod",;  "InfFilename",;  "InfSection",;  "InstallDate",;  "InstalledDisplayDrivers",;  "LastErrorCode",;  "MaxMemorySupported",;  "MaxNumberControlled",;  "MaxRefreshRate",;  "MinRefreshRate",;  "Monochrome",;  "Name",;  "NumberOfColorPlanes",;  "NumberOfVideoPages",;  "PNPDeviceID",;  "PowerManagementCapabilities",;  "PowerManagementSupported",;  "ProtocolSupported",;  "ReservedSystemPaletteEntries",;  "SpecificationVersion",;  "Status",;  "StatusInfo",;  "SystemCreationClassName",;  "SystemName",;  "SystemPaletteEntries",;  "TimeOfLastReset",;  "VideoArchitecture",;  "VideoMemoryType",;  "VideoMode",;  "VideoModeDescription",;  "VideoProcessor"  }

 
p.s. it do happens in FiveWin Forum where i got HTML COLOR in CODE
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: what is use for CRLF in HTLM ?

Postby Otto » Thu Sep 08, 2022 9:07 am

Hi Jimmy,
Do you have a text example?
Have you already examined the text with a HEX code editor?

LG
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: what is use for CRLF in HTLM ?

Postby Otto » Thu Sep 08, 2022 11:40 am

Hi Jimmy,
I have been working on the reverse for the last few days.

Here it works like this:
Code: Select all  Expand view

html
 cText += '<html> \n ' ;
 cText += '<head> \n ' ;
cText += '<style> \n ' ;

from mod harbour
 cText += '<html> \\n ' ;
 cText += '<head> \\n ' ;
cText += '<style> \\n ' ;
(2 backslashes)

 


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: what is use for CRLF in HTLM ?

Postby Jimmy » Sun Sep 11, 2022 3:43 pm

hi Otto,

your \n have bring me on right Way :D

have found out that i have use
Code: Select all  Expand view
  cMemo := STRTRAN(cMemo,"\r\n", "" }

instead of
Code: Select all  Expand view
  cMemo := STRTRAN(cMemo,"\r\n", CRLF }

so CODE look bad

you can use Menu -> Database -> HTMLsign and edit it
use CRLF or better CHR(13)+CHR(10) for "change to"

---

"phpBB Forum Grabber", using HMG Syntax (include Source) , can be download here
https://www.hmgforum.com/viewtopic.php?f=5&t=7281
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests