Function __global->semihtml_to_comcode

Definitions

sources/comcode_from_html.php

  • Convert Semi-HTML into Comcode. Cleanup where possible.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$semihtml LONG_TEXT No No required parameter N/A N/A The Semi-HTML to be converted
$force boolean No No False N/A N/A Whether to force full conversion regardless of settings
$quick boolean No No False N/A N/A Whether to trust the HTML is valid rather than cleaning it up (e.g. for software-generated HTML)
$member_id ?MEMBER No No Null N/A N/A Member to do as (null: current member)

Returns

  • The equivalent Comcode
  • Type: LONG_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Convert Semi-HTML into Comcode. Cleanup where possible.
 *
 * @param  LONG_TEXT $semihtml The Semi-HTML to be converted
 * @param  boolean $force Whether to force full conversion regardless of settings
 * @param  boolean $quick Whether to trust the HTML is valid rather than cleaning it up (e.g. for software-generated HTML)
 * @param  ?MEMBER $member_id Member to do as (null: current member)
 * @return LONG_TEXT The equivalent Comcode
 */

function semihtml_to_comcode(string $semihtml, bool $force = false, bool $quick = false, ?int $member_id = null) : string