Show More
@@ -1135,7 +1135,7 b' def graph(web, req, tmpl):' | |||
|
1135 | 1135 | max([edge[1] for edge in edges] or [0])) |
|
1136 | 1136 | return cols |
|
1137 | 1137 | |
|
1138 | def graphdata(usetuples): | |
|
1138 | def graphdata(usetuples, encodestr): | |
|
1139 | 1139 | data = [] |
|
1140 | 1140 | |
|
1141 | 1141 | row = 0 |
@@ -1143,11 +1143,11 b' def graph(web, req, tmpl):' | |||
|
1143 | 1143 | if type != graphmod.CHANGESET: |
|
1144 | 1144 | continue |
|
1145 | 1145 | node = str(ctx) |
|
1146 | age = templatefilters.age(ctx.date()) | |
|
1147 | desc = templatefilters.firstline(ctx.description()) | |
|
1146 | age = encodestr(templatefilters.age(ctx.date())) | |
|
1147 | desc = templatefilters.firstline(encodestr(ctx.description())) | |
|
1148 | 1148 | desc = cgi.escape(templatefilters.nonempty(desc)) |
|
1149 | user = cgi.escape(templatefilters.person(ctx.user())) | |
|
1150 | branch = cgi.escape(ctx.branch()) | |
|
1149 | user = cgi.escape(templatefilters.person(encodestr(ctx.user()))) | |
|
1150 | branch = cgi.escape(encodestr(ctx.branch())) | |
|
1151 | 1151 | try: |
|
1152 | 1152 | branchnode = web.repo.branchtip(branch) |
|
1153 | 1153 | except error.RepoLookupError: |
@@ -1156,8 +1156,9 b' def graph(web, req, tmpl):' | |||
|
1156 | 1156 | |
|
1157 | 1157 | if usetuples: |
|
1158 | 1158 | data.append((node, vtx, edges, desc, user, age, branch, |
|
1159 | [cgi.escape(x) for x in ctx.tags()], | |
|
1160 |
[cgi.escape(x |
|
|
1159 | [cgi.escape(encodestr(x)) for x in ctx.tags()], | |
|
1160 | [cgi.escape(encodestr(x)) | |
|
1161 | for x in ctx.bookmarks()])) | |
|
1161 | 1162 | else: |
|
1162 | 1163 | edgedata = [{'col': edge[0], 'nextcol': edge[1], |
|
1163 | 1164 | 'color': (edge[2] - 1) % 6 + 1, |
@@ -1195,8 +1196,8 b' def graph(web, req, tmpl):' | |||
|
1195 | 1196 | canvaswidth=(cols + 1) * bg_height, |
|
1196 | 1197 | truecanvasheight=rows * bg_height, |
|
1197 | 1198 | canvasheight=canvasheight, bg_height=bg_height, |
|
1198 | jsdata=lambda **x: graphdata(True), | |
|
1199 | nodes=lambda **x: graphdata(False), | |
|
1199 | jsdata=lambda **x: graphdata(True, str), | |
|
1200 | nodes=lambda **x: graphdata(False, str), | |
|
1200 | 1201 | node=ctx.hex(), changenav=changenav) |
|
1201 | 1202 | |
|
1202 | 1203 | def _getdoc(e): |
General Comments 0
You need to be logged in to leave comments.
Login now