From: Wilfried Goesgens Date: Wed, 12 Jun 2013 20:11:53 +0000 (+0200) Subject: Mailinglists: possible room aliases have to be prepared to not contain blanks and... X-Git-Tag: v8.20~21 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e4373a77135bd4c9ab97febf387bf8e289605fab Mailinglists: possible room aliases have to be prepared to not contain blanks and non-ascii-chars. --- diff --git a/webcit/roomlist.c b/webcit/roomlist.c index 2b282ff72..d45db6dc8 100644 --- a/webcit/roomlist.c +++ b/webcit/roomlist.c @@ -427,6 +427,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) HashList *Domains; StrBuf *Line; StrBuf *Token; + StrBuf *RoomName; HashList *PossibleAliases = NULL; const char *pComma; @@ -441,12 +442,15 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) return NULL; PossibleAliases = NewHash(1, NULL); Line = NewStrBuf(); + RoomName = NewStrBufDup(WCC->CurRoom.name); + StrBufAsciify(RoomName, '_'); + StrBufReplaceChars(RoomName, ' ', '_'); AppendPossibleAliasWithDomain(PossibleAliases, &n, Domains, HKEY("room_"), - SKEY(WCC->CurRoom.name)); + SKEY(RoomName)); serv_puts("GNET "FILE_MAILALIAS); @@ -502,7 +506,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) AppendImportantMessage(_("Higher access is required to access this function."), -1); FreeStrBuf(&Line); - + FreeStrBuf(&RoomName); return PossibleAliases; }