• last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
perform javascript escaping with more regular semantics

  1. … 1 more file in changeset.
Introduce new ad_js_escape with the purpose of sanitizing tcl strings used inside javascript code from escape sequences and from quotes in particular and provide some test cases

TODO: consider its usage into templates when e.g. we are putting a URL into javascript functions such as acs_ListBulkActionClick. URLs might in fact contain single and double quotes.

  1. … 1 more file in changeset.
whitespace changes

  1. … 1 more file in changeset.
simplfy index expressions, strengthen input value checking

improve spelling

  1. … 15 more files in changeset.
improving ad_html_to_text:

- handle src specs with "data:" (skip data)

- handle anchors with empty hrefs and internal links by not adding these to the text rendering

- add test cases to regression test

  1. … 1 more file in changeset.
strengthen regexp in ad_text_to_html for adding "mailto:" links

Fix typos

  1. … 8 more files in changeset.
Make ad_sanitize_html not hardly dependant on a connection being there (thanks to Markus moser for the report)

Also, update documentation and make idioms less awkward.

(this passes automated tests)

use util_current_location instead of ad_url in ad_html_qualify_links to provide a proper default also on host-node mapped subsites

use consistently "nocase" in all substitution in ad_html_qualify_links

reduce verbosity

improve source code documentation of ad_html_qualify_links and add test cases

  1. … 1 more file in changeset.
make function usable in situations without an active connection

make function usable in situations, where a location based on ad_url is incorrect (e.g. host-node mapped subsites)

fix indentation and regular expression

Whitespace cleanup

Fix typo

improve spelling

  1. … 6 more files in changeset.
Make string_truncate behave as before (looking for spaces at end_position + 1) and therefore not breaking tests for ad_html_text_convert. Update docs so this property of being less or equal than len is clearly specified

Add '-equal' parameter to 'string_truncate', which allows to truncate a string to a length shorter or *equal* than a specified length.

The fact that 'string_truncate' was producing strings strictly shorter than the specified length, was making the behavior of 'ad_html_text_convert' inconsistent, and breaking automated tests.

This small addition fixes both the behavior and the tests, while retaining compatibility.

Support also the other kinds of whitespace

Update documentation, as no mention to tag closing is made in the code and reimplement procedure exploiting builting tcl idioms (passes automated tests)

Mark procs explicitly as public

Exploit ns_parseurl to streamline some tricky (and broken) protocol check (fixes automated tests)

fix typo

New utility ad_pad emulating both lpad and rpad tipically available in DBMSs

  1. … 1 more file in changeset.
improve spelling

  1. … 12 more files in changeset.
make spelling of names more consistent

  1. … 5 more files in changeset.
Fix typos

  1. … 31 more files in changeset.
- provide test case for html-to-text conversion

- provide a version of html-to-text based on ns_reflow_text

  1. … 2 more files in changeset.