Index: openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl,v diff -u -N -r1.29.2.27 -r1.29.2.28 --- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 27 Aug 2022 20:30:50 -0000 1.29.2.27 +++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 29 Aug 2022 10:34:19 -0000 1.29.2.28 @@ -6,7 +6,7 @@ long-time deprecated functions, which are going to be removed unless there is a good reason not to do. - Note, that FRESHLY DEPRECATED PROCS SHOULD NOT BE moved here, + Note that FRESHLY DEPRECATED PROCS SHOULD NOT BE moved here, otherwise, site using "WithDeprecatedCode" set to 0 will break immediately. One should give people at least one release time to fix invocation of deprecated code. Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -N -r1.126.2.74 -r1.126.2.75 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 26 Aug 2022 12:06:43 -0000 1.126.2.74 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 29 Aug 2022 10:34:18 -0000 1.126.2.75 @@ -1182,7 +1182,7 @@ When the file exists, we also enforce additional criteria: - file must belong to the current system user - - file must be readable and writeable by the current system user + - file must be readable and writable by the current system user @param tmpfile absolute path to a possibly existing tmpfile @param must_exist make sure the file exists Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -N -r1.61.2.32 -r1.61.2.33 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 26 Aug 2022 12:06:44 -0000 1.61.2.32 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 29 Aug 2022 10:34:19 -0000 1.61.2.33 @@ -1843,7 +1843,7 @@ The check will take the object_type hierarchy into account e.g. will always succeed if one of the types is "acs_object". In - this case the filter will just behave as an existance check. + this case the filter will just behave as an existence check. } { if { $types eq "" } { Index: openacs-4/packages/acs-tcl/tcl/test/acs-db-00-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/acs-db-00-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-tcl/tcl/test/acs-db-00-procs.tcl 14 Mar 2022 10:54:27 -0000 1.1.2.2 +++ openacs-4/packages/acs-tcl/tcl/test/acs-db-00-procs.tcl 29 Aug 2022 10:34:19 -0000 1.1.2.3 @@ -1,6 +1,6 @@ ad_library { - Tests for low level interface for defining the basic classes for + Tests for low-level interface for defining the basic classes for the DB interface. } Index: openacs-4/packages/acs-tcl/tcl/test/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/apm-install-procs.tcl,v diff -u -N -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-tcl/tcl/test/apm-install-procs.tcl 19 Aug 2022 10:15:46 -0000 1.1.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/apm-install-procs.tcl 29 Aug 2022 10:34:19 -0000 1.1.2.2 @@ -10,7 +10,7 @@ apm_get_repository_channels } \ apm_respositories_api { - Check the api to retrieve upstream repositories + Check the API to retrieve upstream repositories } { set repos failed Index: openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl,v diff -u -N -r1.20.2.12 -r1.20.2.13 --- openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 26 Aug 2022 13:00:49 -0000 1.20.2.12 +++ openacs-4/packages/acs-tcl/tcl/test/html-conversion-procs.tcl 29 Aug 2022 10:34:19 -0000 1.20.2.13 @@ -154,7 +154,7 @@ aa_true "Tag a is not allowed - empty tag list" {[ad_html_security_check -allowed_tags "" $html] ne {}} set html "hello An Link world." - aa_true "Tag a is not allowed - non-empty tag list" {[ad_html_security_check -allowed_tags "b h1" $html] ne {}} + aa_true "Tag a is not allowed - nonempty tag list" {[ad_html_security_check -allowed_tags "b h1" $html] ne {}} set html "hello An Link world." aa_equals "Tag 'a' is allowed" [ad_html_security_check -allowed_tags "a b h1" $html] "" @@ -169,9 +169,14 @@ } { aa_equals "" [util_close_html_tags "Foobar"] "Foobar" aa_equals "" [util_close_html_tags "Foobar"] "Foobar" - aa_equals "" [util_close_html_tags "Foobar is a very long word"] "Foobar is a very long word" - aa_equals "" [util_close_html_tags "Foobar is a very long word" 15] "Foobar is a" - aa_equals "" [util_close_html_tags "Foobar is a very long word" 0 20 "..."] "Foobar is a very..." + aa_equals "" [util_close_html_tags "Foobar is a very long word"] \ + "Foobar is a very long word" + aa_equals "" [util_close_html_tags "Foobar is a very long word" 15] \ + "Foobar is a" + aa_equals "" [util_close_html_tags "Foobar is a very long word" 0 20 "..."] \ + "Foobar is a very..." + set result [util_close_html_tags "
Foobar 'i' and 'div' not closed"] + aa_true [ns_quotehtml $result] {$result eq "
Foobar 'i' and 'div' not closed
"} } @@ -197,7 +202,8 @@ aa_equals "" [ad_html_text_convert -from "text/enhanced" -to "text/html" -truncate_len 14 -- $string] \ [ad_enhanced_text_to_html "What?\nNever..."] - # The string is longer in plaintext, because the "_" symbol to denote italics is counted as well. + # The string is longer in plaintext, because the "_" symbol to + # denote italics is counted as well. aa_equals "" [ad_html_text_convert -from "text/enhanced" -to "text/plain" -truncate_len 15 -- $string] "What?\n_Never..." #---------------------------------------------------------------------- @@ -338,6 +344,19 @@ set result [util_convert_line_breaks_to_html $html] aa_true "Now html='[ns_quotehtml $result]'" [regexp {a layout} $result] + # do not add
inside
+    set text "text begin\r\n
\nline1\nline2\n
text\nend\n" + aa_log "Input:
[ns_quotehtml $text]
" + set result [util_convert_line_breaks_to_html -contains_pre $text] + aa_log "result is
[ns_quotehtml $result]
" + set nrBr [regsub -all
$result
.] + aa_true "text contains some [ns_quotehtml
] tags" {$nrBr > 0} + + if {[::acs::icanuse "ns_parsehtml"]} { + aa_true "text contains $nrBr [ns_quotehtml
] tags" {$nrBr == 2} + } + + } @@ -550,6 +569,45 @@ } aa_register_case \ + -cats {api smoke} \ + -procs { + ad_text_to_html + util_convert_line_breaks_to_html + } \ + ad_text_to_html { + Test rendering of a more or less standard HTML text +} { + set text {We could use a
instead than a
layout »

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 ** $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

 although "pre" is not included in the
+    # regular expression.
+    #
+    set text "text begin\n
\nline1\nline2\n
text\nend\n" + aa_log "Input:
[ns_quotehtml $text]
" + set result [ad_text_to_html -includes_html -no_quote $text] + aa_log "result is
[ns_quotehtml $result]
" + set nrBr [regsub -all
$result
.] + aa_true "text contains [ns_quotehtml
] tags" {$nrBr > 0} + + if {[::acs::icanuse "ns_parsehtml"]} { + aa_true "text contains $nrBr [ns_quotehtml
] tags" {$nrBr == 1} + } + #aa_equals "new: $html _version should be the same" $html_version $string_with_img + +} + + +aa_register_case \ -cats {api} \ -bugs 1450 \ -procs {ad_enhanced_text_to_html} \ @@ -559,11 +617,12 @@ @author Nima Mazloumi } { - set string_with_img {} - aa_log "Original string is $string_with_img" - set html_version [ad_enhanced_text_to_html $string_with_img] - aa_equals "new: $html_version should be the same" $html_version $string_with_img -} + set text_with_pre "text\n
\nline1\nline2\n
text end\n" + aa_log "Original string is [ns_quotehtml $text_with_pre]" + set html [ad_enhanced_text_to_html $text_with_pre] + aa_log "result is [ns_quotehtml $html]" + #aa_equals "new: $html _version should be the same" $html_version $string_with_img + } aa_register_case \ -cats {api smoke} \ Index: openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl,v diff -u -N -r1.9.2.9 -r1.9.2.10 --- openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl 8 Aug 2022 14:48:48 -0000 1.9.2.9 +++ openacs-4/packages/acs-tcl/tcl/test/object-test-case-procs.tcl 29 Aug 2022 10:34:19 -0000 1.9.2.10 @@ -204,11 +204,11 @@ [acs_object::is_type_p -object_id $object_id -object_type person] aa_true "Is $object_id a party?" \ [acs_object::is_type_p -object_id $object_id -object_type party] - aa_true "Is $object_id a user (no hierachy)?" \ + aa_true "Is $object_id a user (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id -object_type user -no_hierarchy] - aa_false "Is $object_id a person (no hierachy)?" \ + aa_false "Is $object_id a person (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id -object_type person -no_hierarchy] - aa_false "Is $object_id a party (no hierachy)?" \ + aa_false "Is $object_id a party (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id -object_type party -no_hierarchy] aa_true "Is $object_id a user os a package?" \ @@ -217,13 +217,13 @@ [acs_object::is_type_p -object_id $object_id -object_type {apm_package person}] aa_true "Is $object_id a party or a package?" \ [acs_object::is_type_p -object_id $object_id -object_type {apm_package party}] - aa_true "Is $object_id a user or a package (no hierachy)?" \ + aa_true "Is $object_id a user or a package (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id -object_type {apm_package user} -no_hierarchy] - aa_false "Is $object_id a person or a package (no hierachy)?" \ + aa_false "Is $object_id a person or a package (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id \ -object_type {apm_package person} \ -no_hierarchy] - aa_false "Is $object_id a party or a package (no hierachy)?" \ + aa_false "Is $object_id a party or a package (no hierarchy)?" \ [acs_object::is_type_p -object_id $object_id \ -object_type {apm_package party} -no_hierarchy]