Public bug reported:

The language L10n translated language fields that are marked
__like_this__

Under certain conditions where database output happens to contain double
underscores in certain contexts, the parser will get confused, and end
up not replacing the translated terms.

It's quite possible for some site database output to accidentally match
the rule '/\_\_(.*)\_\_/U'

In fact it's happening on Open Font Library!

To reproduce this error:

* Create a fresh aiki site
* Create a new user in the database: INSERT INTO aiki_users (username, 
full_name) values ('example__', 'example__')
* Create a new widget
** In the SQL query: select * from aiki_users 
** In the content: <p><a href="((full_name))">((username))</a></p>

The important output will be:

<p><a href="example__">example__</a></p>

The effect is that L10n() seems to have trouble parsing this page.

If you view source on this page you can see that other __aiki_terms__
are not getting replaced:

<meta http-equiv="Content-Type" content="text/html;
charset=__encoding__" />

** Affects: aikiframework
     Importance: Critical
         Status: New

** Affects: openfontlibrary
     Importance: Critical
     Assignee: Christopher Adams (christopheradams)
         Status: Confirmed

** Changed in: aikiframework
   Importance: Undecided => Critical

** Changed in: aikiframework
    Milestone: None => 0.9

** Also affects: openfontlibrary
   Importance: Undecided
       Status: New

** Changed in: openfontlibrary
       Status: New => Confirmed

** Changed in: openfontlibrary
   Importance: Undecided => Critical

** Changed in: openfontlibrary
     Assignee: (unassigned) => Christopher Adams (christopheradams)

** Changed in: openfontlibrary
    Milestone: None => 0.3

-- 
You received this bug notification because you are a member of Aiki
Framework Admins, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/794093

Title:
  languages L10n is brittle on database fields containing __

Status in Aiki Framework:
  New
Status in Open Font Library:
  Confirmed

Bug description:
  The language L10n translated language fields that are marked
  __like_this__

  Under certain conditions where database output happens to contain
  double underscores in certain contexts, the parser will get confused,
  and end up not replacing the translated terms.

  It's quite possible for some site database output to accidentally
  match the rule '/\_\_(.*)\_\_/U'

  In fact it's happening on Open Font Library!

  To reproduce this error:

  * Create a fresh aiki site
  * Create a new user in the database: INSERT INTO aiki_users (username, 
full_name) values ('example__', 'example__')
  * Create a new widget
  ** In the SQL query: select * from aiki_users 
  ** In the content: <p><a href="((full_name))">((username))</a></p>

  The important output will be:

  <p><a href="example__">example__</a></p>

  The effect is that L10n() seems to have trouble parsing this page.

  If you view source on this page you can see that other __aiki_terms__
  are not getting replaced:

  <meta http-equiv="Content-Type" content="text/html;
  charset=__encoding__" />

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework.admins
Post to     : aikiframework.admins@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework.admins
More help   : https://help.launchpad.net/ListHelp

Reply via email to