[KSS-checkins] r46003 - kukit/kss.core/trunk/kss/core/plugins/core

reebalazs at codespeak.net reebalazs at codespeak.net
Mon Aug 27 09:28:39 CEST 2007


Author: reebalazs
Date: Mon Aug 27 09:28:38 2007
New Revision: 46003

Modified:
   kukit/kss.core/trunk/kss/core/plugins/core/commands.py
Log:
Small refactoring of parameter adding, use the helpers

Modified: kukit/kss.core/trunk/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/commands.py	(original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/commands.py	Mon Aug 27 09:28:38 2007
@@ -29,16 +29,14 @@
     
     def replaceInnerHTML(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('replaceInnerHTML', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
 
     def replaceHTML(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('replaceHTML', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
     
     def setAttribute(self, selector, name, value):
@@ -55,30 +53,26 @@
     
     def insertHTMLAfter(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('insertHTMLAfter', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
 
     def insertHTMLAsFirstChild(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('insertHTMLAsFirstChild', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
 
     def insertHTMLAsLastChild(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('insertHTMLAsLastChild', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
 
     def insertHTMLBefore(self, selector, new_value, withKssSetup='True'):
         """ see interfaces.py """
-        new_value = HtmlParser(new_value)().encode('ascii', 'xmlcharrefreplace')
         command = self.commands.addCommand('insertHTMLBefore', selector)
-        data = command.addParam('html', new_value)
+        data = command.addHtmlParam('html', new_value)
         data = command.addParam('withKssSetup', withKssSetup)
 
     def clearChildNodes(self, selector):


More information about the Kukit-checkins mailing list