comment insensitivity
authorjhurst <jhurst@cinecert.com>
Tue, 14 Oct 2014 00:14:39 +0000 (00:14 +0000)
committerjhurst <>
Tue, 14 Oct 2014 00:14:39 +0000 (00:14 +0000)
src/KM_xml.cpp
src/TimedText_Parser.cpp

index c52d73a55bfb1a6513db3f20bce8c05b613fc030..dcb35a3a4e60a427353839a4a280b3866b9d50f4 100644 (file)
@@ -1067,8 +1067,29 @@ Kumu::GetXMLDocType(const byte_t* buf, ui32_t buf_len, std::string& ns_prefix, s
               break;
             }
         }
+      else if ( *p1 == '<' && ( ( p1 + 3 ) < end_p ) && p1[1] == '!' && p1[2] == '-' && p1[3] == '-' )
+       {
+          p1 += 4;
 
-      ++p1;
+         for (;;)
+           {
+             while ( *p1 != '>' && p1 < end_p )
+               {
+                 ++p1;
+               }
+
+             if ( *(p1-2) == '-' && *(p1-1) == '-' && *p1 == '>' )
+               {
+                 break;
+               }
+
+             ++p1;
+           }
+       }
+      else
+       {
+         ++p1;
+       }
     }
 
   if ( isspace(*p2) )
@@ -1104,7 +1125,7 @@ Kumu::GetXMLDocType(const byte_t* buf, ui32_t buf_len, std::string& ns_prefix, s
       for ( i = doc_attr_nvpairs.begin(); i != doc_attr_nvpairs.end(); ++i )
         {
          // trim leading and trailing whitespace an right-most character, i.e., \"
-         std::string trimmed = i->substr(i->find_first_not_of(" "), i->find_last_not_of(" "));
+         std::string trimmed = i->substr(i->find_first_not_of(" "), i->find_last_not_of(" \r\n\t"));
           std::list<std::string> nv_tokens = km_token_split(trimmed, "=\"");
 
           if ( nv_tokens.size() != 2 )
index ea5f0a9e3cf34b85011dbaa2875ffb9eba7560df..e3916943dd87a973d190ef607378e940377922e2 100644 (file)
@@ -78,7 +78,7 @@ ASDCP::TimedText::LocalFilenameResolver::ResolveRID(const byte_t* uuid, TimedTex
   if ( found_list.size() == 1 )
     {
       FileReader Reader;
-      DefaultLogSink().Debug("retrieving resource %s from file %s\n", buf, found_list.front().c_str());
+      DefaultLogSink().Debug("Retrieving resource %s from file %s\n", buf, found_list.front().c_str());
 
       result = Reader.OpenRead(found_list.front().c_str());