Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2099 closed defect (fixed)

SSIDs with certain characters show up as blank in Sugar

Reported by: fran Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Minor Keywords: r+
Cc: Distribution/OS:
Bug Status: Unconfirmed

Description

Any wireless network with characters special to XML in the SSID (e.g. <, >, and &) shows up as blank in the Sugar interface (mousing over a network in neighborhood view, in the network icon in the frame, etc.), because the Palette component parses the labels as XML-like Pango markup.

The following patch should fix it:
http://git.sugarlabs.org/projects/sugar/repos/frans-clone/commits/5635e9e56468d02de79a1047e0c5e5c716f58671

Change History (7)

comment:1 Changed 14 years ago by sascha_silbe

  • Distribution/OS Fedora deleted

This is closely related to, though not a dupe of #2023.

BTW, this looks like it would produce incorrect results for some languages:

+            text = (_("Mesh Network") + " " +
+                    glib.markup_escape_text(str(self._channel)))

A fix might look similar to this:

            text = _("Mesh Network %s") % (glib.markup_escape_text(self._channel), )

Since you're already at it, could you take a look at the non-ASCII issue (i.e. #2023) as well, please?

Once you've fixed the non-ASCII issue or decided not to work on fixing it, please set the r? keyword. See the Code Review guidelines for more information.

comment:2 follow-up: Changed 14 years ago by fran

  • Keywords r? added

I've replaced the string concatenation there with %s: http://git.sugarlabs.org/projects/sugar/repos/frans-clone/commits/612f60917242a0fd59953eece0a0c884a7b5d04b

#2023 isn't quite as related as it appears at first glance; it's a lower-level problem involving the use of non-UTF-8 encodings (which can't be detected reliably), and involves problems of D-Bus marshaling. It's probably best addressed in a separate patch.

I've gone ahead and marked it for code review; the test case follows. Reviewers can consult the two commits I linked above, or the cloned repository on Gitorious: http://git.sugarlabs.org/projects/sugar/repos/frans-clone

|TestCase|

  1. Ensure a wireless network exists nearby with an SSID containing one or more characters in the set "&<>".
  2. In Sugar, go to the Neighborhood view, and locate the icon for the above wireless network. Ensure the SSID appears in the menu when you mouseover the icon.
  3. Connect to the above network in Sugar.
  4. Bring up the Frame. Mouseover the circular network icon in the lower-right-hand corner. Ensure the SSID appears in this menu.

comment:3 in reply to: ↑ 2 Changed 14 years ago by tomeu

  • Keywords r+ added; r? removed

Looks great, thanks, please push.

Replying to fran:

I've gone ahead and marked it for code review; the test case follows. Reviewers can consult the two commits I linked above, or the cloned repository on Gitorious: http://git.sugarlabs.org/projects/sugar/repos/frans-clone

For small fixes like this, please attach a single patch file generated with git-format-patch or have a cloned tree with only the changes relevant to each ticket.

comment:4 Changed 14 years ago by fran

Thanks! Filed a merge request on the cloned tree with the fixes:

http://git.sugarlabs.org/projects/sugar/repos/mainline/merge_requests/217

comment:5 Changed 14 years ago by tomeu

  • Resolution set to fixed
  • Status changed from new to closed

Already merged, thanks!

comment:6 Changed 14 years ago by sascha_silbe

Please post a link to the mainline commit on gitorious.

Note: See TracTickets for help on using tickets.