Ticket #1084 (closed defect: fixed)

Opened 9 months ago

Last modified 7 months ago

createTiddlyText regression

Reported by: proppy Owned by: MartinBudden
Priority: undefined Milestone: 2.5.3
Component: core Version:
Severity: undefined Keywords:
Cc:

Description

Hi,

I think Jayfresh and I spotted a regression in jquery implemention of createTiddlyText: function createTiddlyText(parent,text) {

return jQuery(parent).append(text);

} returns the parent instead of the created element. Althought is given "<div>" as text argument it will create html <div></div> instead of a text node with '<div>' as content.

This as the side effect of breaking TiddlyTemplating? stuff: when using a template: <div><!--<<viewer text>>--></div> expands to: <div></div>text instead of: <div>text</div>

Would you consider reverting to the previous implementation ? function createTiddlyText(theParent,theText) {

return theParent.appendChild(document.createTextNode(theText));

}

#jquery guys told me that jquery provide no good way to manipulate text node directly. I attached a patch, that add a test to the qunit test suite to reproduce the issue, and revert to the createTiddlyText previous implementation.

Attachments

Change History

Changed 9 months ago by proppy

Changed 9 months ago by FND

  • owner changed from JeremyRuston to FND
  • status changed from new to assigned
  • milestone set to 2.5.3

Changed 8 months ago by FND

  • owner changed from FND to MartinBudden
  • status changed from assigned to new

Changed 8 months ago by MartinBudden

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:10108

Changed 7 months ago by FND

As reported  here, the previous use of jQuery here also changed the behavior, allowing raw HTML without the explicit <html>...</html> markers.

Note: See TracTickets for help on using tickets.