_acs-tcl__ad_text_to_html (private)

 _acs-tcl__ad_text_to_html

Defined in packages/acs-tcl/tcl/test/html-conversion-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) acs::icanuse acs::icanuse (public) ad_text_to_html ad_text_to_html (public) _acs-tcl__ad_text_to_html _acs-tcl__ad_text_to_html _acs-tcl__ad_text_to_html->aa_log _acs-tcl__ad_text_to_html->aa_log_result _acs-tcl__ad_text_to_html->aa_true _acs-tcl__ad_text_to_html->acs::icanuse _acs-tcl__ad_text_to_html->ad_text_to_html

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set text {We could use a <div> instead than a <table> layout » <p> for the list for example.»}
    set result [ad_text_to_html -no_quote -includes_html -- $text]
    aa_log "Input:\n[ns_quotehtml $text]"
    aa_log "Result:\n[ns_quotehtml $result]"
    if {[::acs::icanuse "ns_parsehtml"]} {
        aa_true "text contains sample code" [string match *<samp>* $result]
    }
    aa_true "gullimet » preserved" [string match *»* $result]

    #
    # This calls util_convert_line_breaks_to_html as well, but
    # strangely when this is called with -includes_html" it removes
    # newlines around <pre> although "pre" is not included in the
    # regular expression.
    #
    set text "text begin\n<pre>\nline1\nline2\n</pre>text\nend\n"
    aa_log "Input: <pre>[ns_quotehtml $text]</pre>"
    set result [ad_text_to_html -includes_html -no_quote $text]
    aa_log "result is <pre>[ns_quotehtml $result]</pre>"
    set nrBr [regsub -all <br> $result <br> .]
    aa_true "text contains [ns_quotehtml <br>] tags" {$nrBr > 0}
    
    if {[::acs::icanuse "ns_parsehtml"]} {
        aa_true "text contains $nrBr [ns_quotehtml <br>] tags" {$nrBr == 1}
    }
    #aa_equals "new: $html _version should be the same" $html_version $string_with_img
    
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "ad_text_to_html (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: