7 Module implementing a class to write Netscape HTML bookmark files. |
7 Module implementing a class to write Netscape HTML bookmark files. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import QFile, QIODevice, QObject |
10 from PyQt6.QtCore import QFile, QIODevice, QObject |
11 |
11 |
12 from eric7 import Utilities |
12 from eric7 import EricUtilities, Utilities |
13 |
13 |
14 from .BookmarkNode import BookmarkNodeType |
14 from .BookmarkNode import BookmarkNodeType |
15 |
15 |
16 |
16 |
17 class NsHtmlWriter(QObject): |
17 class NsHtmlWriter(QObject): |
131 ) |
131 ) |
132 |
132 |
133 self.__dev.write(" " * indent) |
133 self.__dev.write(" " * indent) |
134 self.__dev.write( |
134 self.__dev.write( |
135 '<DT><A HREF="{0}"{1}{2}{3}>{4}</A>\n'.format( |
135 '<DT><A HREF="{0}"{1}{2}{3}>{4}</A>\n'.format( |
136 node.url, added, modified, visited, Utilities.html_uencode(node.title) |
136 node.url, |
|
137 added, |
|
138 modified, |
|
139 visited, |
|
140 EricUtilities.html_uencode(node.title), |
137 ) |
141 ) |
138 ) |
142 ) |
139 |
143 |
140 if node.desc: |
144 if node.desc: |
141 self.__dev.write(" " * indent) |
145 self.__dev.write(" " * indent) |