changed solution for sorting template in Dropdown
with checking in  TidyAll
Merge remote-tracking branch 'origin/rel-3_3_bug#10595' into rel-3_3_bug#10595