That example is a bit too long but it is what is really happening on
OFLB.

You can confirm this bug just by using something like the following as
widget content:

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

-- 
You received this bug notification because you are a member of Aiki
Framework Developers, 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-devel
Post to     : aikiframework-devel@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to