mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Fixed encoding-issue with channelnames
This commit is contained in:
		| @@ -21,6 +21,7 @@ var app = express(); | ||||
| var compression = require('compression'); | ||||
| var exphbs = require('express-handlebars'); | ||||
| var cors = require('cors'); | ||||
| var Functions = require(pathThumbnails + '/handlers/functions.js'); | ||||
|  | ||||
| var hbs = exphbs.create({ | ||||
| 	defaultLayout: publicPath + '/layouts/client/main', | ||||
| @@ -33,6 +34,10 @@ var hbs = exphbs.create({ | ||||
|             } else { | ||||
|                 return opts.inverse(this) | ||||
|             } | ||||
|         }, | ||||
|         decodeString: function(s) { | ||||
| 			if(s == undefined) return s; | ||||
|             return Functions.decodeChannelName(s); | ||||
|         } | ||||
|  | ||||
|     } | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|                         <i class="material-icons pin" style="{{#if pinned}}display:block;{{/if}}{{#unless pinned}}display:none;{{/unless}}">star_rate</i> | ||||
|  | ||||
|                     <p class="left-align"> | ||||
|                         <span class="chan-name flow-text truncate">{{_id}}</span> | ||||
|                         <span class="chan-name flow-text truncate">{{decodeString _id}}</span> | ||||
|                         <br> | ||||
|                         <span class="highlighted">Viewers: </span> | ||||
|                         <span class="chan-views">{{viewers}}</span> | ||||
| @@ -23,7 +23,7 @@ | ||||
|                 {{#if_equal description "This list has no description"}} | ||||
|                 {{else}} | ||||
|                     <div class="card-reveal"> | ||||
|                         <span class="card-title grey-text text-darken-4 truncate">{{_id}}</span> | ||||
|                         <span class="card-title grey-text text-darken-4 truncate">{{decodeString _id}}</span> | ||||
|                         <p class="description_text">{{description}}</p> | ||||
|                     </div> | ||||
|                 {{/if_equal}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user